diff --git a/ CODEOWNERS b/ CODEOWNERS new file mode 100644 index 0000000000000000000000000000000000000000..0865e794573cff8cbce36c4ad5cafd14e1829d8e --- /dev/null +++ b/ CODEOWNERS @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +[base api] +api/@ohos.base.d.ets @majiajun518 +api/@ohos.base.d.ts @majiajun518 + +[通用模块] +build-tools/ @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue +BUILD.gn @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue +bundle.json @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue +exists_path.py @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue +ohos_copy_ets.py @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue +process_internal.py @wangcaoyu @txdyyangbo @wanghanghui @Gpangjiaxue + +[API裁剪工具] +build-tools/delete_systemapi_plugin.js @wangcaoyu + +[API打包工具] +build-tools/handleApiFiles.js @wangzhiyusss +arkui_transformer.py + +[int转number工具] +build-tools/intToNumber.js @wangzhiyusss diff --git a/BUILD.gn b/BUILD.gn index 6fc0f303ab6cca32b27ffde45518bb40a9004a7c..083a5a35acc01146c32a9c36acf8c0bbfb2136d0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -25,16 +25,6 @@ action("ohos_base_split") { script = "//build/ohos/sdk/parse_interface_sdk.py" ohos_sdk_arkts_description_file = "${interface_sdk_path}/ohos_sdk_pub_description_std.json" - if (host_os == "mac") { - node_path = "//prebuilts/build-tools/common/nodejs/node-v16.20.2-darwin-x64/bin/node" - npm_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-darwin-x64/bin/npm" - } else { - node_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/node" - npm_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/npm" - } args = [ "--sdk-description-file", rebase_path("//build/ohos/sdk/ohos_sdk_description_std.json", @@ -42,7 +32,7 @@ action("ohos_base_split") { "--root-build-dir", rebase_path("//", root_build_dir), "--node-js", - rebase_path(node_path, root_build_dir), + rebase_path(nodejs, root_build_dir), "--output-arkts-sdk-desc-file", rebase_path(ohos_sdk_arkts_description_file, root_build_dir), "--sdk-build-public", @@ -50,7 +40,7 @@ action("ohos_base_split") { "--sdk-build-arkts", "${sdk_build_arkts}", "--npm-path", - rebase_path(npm_path, root_build_dir), + rebase_path(npm, root_build_dir), "--output-interface-sdk", rebase_path(interface_sdk_path, root_build_dir), ] @@ -154,6 +144,14 @@ ohos_declaration_template("ohos_declaration_ets") { sdk_type = "ets" } +ohos_copy("ohos_declaration_ets_api") { + deps = [ ":ohos_declaration_ets" ] + sources = + [ root_out_dir + "/ohos_declaration/${sdk_type}/ohos_declaration_ets" ] + + outputs = [ target_out_dir + "/../api" ] +} + # ets2/api执行脚本 ohos_declaration_template("ohos_declaration_ets2") { sdk_type = "ets2" @@ -165,12 +163,30 @@ ohos_copy_internal("ets_internal_api") { iv_input = interface_sdk_path_ets1 + "/api/@internal/ets" } +ohos_prebuilt_etc("ets_internal_api_etc") { + source = "OAT.xml" + deps = [ ":ets_internal_api" ] + install_enable = false + output = string_replace(source, "OAT", "ets_internal_api_etc") + part_name = "sdk" + subsystem_name = "sdk" +} + # ets/arkts执行脚本 ohos_copy_internal("bundle_arkts") { sdk_type = "ets" iv_input = interface_sdk_path_ets1 + "/arkts" } +ohos_prebuilt_etc("bundle_arkts_etc") { + source = "OAT.xml" + deps = [ ":bundle_arkts" ] + install_enable = false + output = string_replace(source, "OAT", "bundle_arkts_etc") + part_name = "sdk" + subsystem_name = "sdk" +} + # ets1.2/arkts执行脚本 ohos_copy_internal("bundle_arkts_ets1.2") { sdk_type = "ets2" @@ -200,6 +216,15 @@ ohos_copy_internal("ets_component") { iv_input = interface_sdk_path_ets1 + "/api/@internal/component/ets" } +ohos_prebuilt_etc("ets_component_etc") { + source = "OAT.xml" + deps = [ ":ets_component" ] + install_enable = false + output = string_replace(source, "OAT", "ets_component_etc") + part_name = "sdk" + subsystem_name = "sdk" +} + # ets1.2/arkui/component执行脚本 ohos_copy_internal("ets_component2") { sdk_type = "ets2" @@ -212,6 +237,15 @@ ohos_copy_internal("bundle_kits") { iv_input = interface_sdk_path_ets1 + "/kits" } +ohos_prebuilt_etc("bundle_kits_etc") { + source = "OAT.xml" + deps = [ ":bundle_kits" ] + install_enable = false + output = string_replace(source, "OAT", "ohos_prebuilt_etc") + part_name = "sdk" + subsystem_name = "sdk" +} + # ets2/kits执行脚本 ohos_copy_internal("bundle_kits2") { sdk_type = "ets2" @@ -325,16 +359,6 @@ action("ohos_ets_api_arkui_tmp") { deps = [ ":ohos_ets_api_tmp" ] script = "//interface/sdk-js/arkui_transformer.py" - if (host_os == "mac") { - node_path = "//prebuilts/build-tools/common/nodejs/node-v16.20.2-darwin-x64/bin/node" - npm_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-darwin-x64/bin/npm" - } else { - node_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/node" - npm_path = - "//prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64/bin/npm" - } args = [ "--input", rebase_path(ohos_ets_api_tmp_path + "/@internal/component/ets", @@ -344,9 +368,9 @@ action("ohos_ets_api_arkui_tmp") { "--source_root_dir", rebase_path("//", root_build_dir), "--npm-path", - rebase_path(npm_path, root_build_dir), + rebase_path(npm, root_build_dir), "--node-js", - rebase_path(node_path, root_build_dir), + rebase_path(nodejs, root_build_dir), ] outputs = [ "$ohos_ets_api_arkui_tmp_path" ] } @@ -368,7 +392,10 @@ ohos_copy("ohos_ets_kits") { } ohos_copy("ohos_ets_api") { - deps = [ ":ohos_ets_api_tmp" ] + deps = [ + ":ohos_ets_api_arkui_tmp", + ":ohos_ets_api_tmp", + ] sources = [ ohos_ets_api_tmp_path ] outputs = [ ohos_ets_api_path ] part_name = "sdk" diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index 8c34b13777e9de6b6ecf005da9a75431311e99ba..cf732bb4e5ed59939ac8bc342fe178f0fe2762e7 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { + VoidCallback, ResourceStr, ResourceColor, Dimension, BorderRadiuses, LocalizedEdgeColors, EdgeColors, + EdgeWidths, LocalizedEdgeWidths, EdgeStyles, LocalizedBorderRadiuses +} from './units'; +import { Callback, DismissReason, Rectangle, BlurStyle, TransitionEffect, ShadowOptions, HoverModeAreaType, + ShadowStyle, BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; +import { DialogButtonStyle, BorderStyle } from './enums'; +import { DialogAlignment } from './alertDialog'; +import { LevelOrder, LevelMode, ImmersiveMode } from '../../@ohos.promptAction'; +/*** endif */ + /** * The information of sheet. * @@ -40,7 +53,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SheetInfo { /** @@ -65,7 +79,8 @@ interface SheetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title: string | Resource; @@ -91,7 +106,8 @@ interface SheetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string | Resource; @@ -127,7 +143,8 @@ interface SheetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } @@ -139,7 +156,8 @@ interface SheetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** @@ -149,19 +167,20 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; /** - * Reason why the dialog box cannot be dismissed. You must specify whether to close the dialog box for each of the - * listed actions. + * Dismiss reason type. * * @type { DismissReason } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -173,7 +192,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetButtonOptions { /** @@ -203,7 +223,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -234,7 +255,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus?: boolean; @@ -264,7 +286,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ style?: DialogButtonStyle; @@ -300,7 +323,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | Resource; @@ -336,7 +360,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } @@ -348,7 +373,8 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetOffset { /** @@ -359,7 +385,8 @@ interface ActionSheetOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dx: number | string | Resource; /** @@ -370,7 +397,8 @@ interface ActionSheetOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dy: number | string | Resource; } @@ -419,7 +447,8 @@ declare type ImmersiveMode = import('../api/@ohos.promptAction').ImmersiveMode; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ActionSheetOptions { @@ -445,7 +474,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title: string | Resource; @@ -462,7 +492,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; @@ -488,7 +519,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: string | Resource; @@ -525,7 +557,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ confirm?: ActionSheetButtonOptions; @@ -561,7 +594,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: VoidCallback; @@ -587,7 +621,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sheets: Array; @@ -615,7 +650,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -646,7 +682,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -683,7 +720,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: ActionSheetOffset; @@ -707,7 +745,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -726,13 +765,14 @@ interface ActionSheetOptions *
A dialog box whose showInSubWindow attribute is true cannot trigger the display of another dialog box whose * showInSubWindow attribute is also true. *

- * + * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -751,7 +791,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -776,7 +817,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -802,7 +844,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -813,7 +856,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -824,7 +868,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -842,7 +887,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -860,7 +906,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -875,7 +922,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; @@ -889,7 +937,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -903,7 +952,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; @@ -918,7 +968,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -934,7 +985,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -946,7 +998,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -959,7 +1012,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -971,7 +1025,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -983,7 +1038,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -994,7 +1050,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -1005,7 +1062,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -1016,7 +1074,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -1027,7 +1086,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; @@ -1039,7 +1099,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; @@ -1053,7 +1114,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; @@ -1065,7 +1127,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -1077,7 +1140,8 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; } diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index 9c7ee8c1d04a61a64d5a4ee66e40507161c11518..2a90fff4334c54e45c03a4cef50f27f63c097bb9 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -18,6 +18,17 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { + ResourceStr, ResourceColor, VoidCallback, Offset, Dimension, BorderRadiuses, LocalizedBorderRadiuses, EdgeWidths, + LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, EdgeStyles +} from './units'; +import { WordBreak, DialogButtonStyle, BorderStyle } from './enums'; +import { Rectangle, BlurStyle, Callback, TransitionEffect, ShadowOptions, ShadowStyle, HoverModeAreaType, DismissReason, + BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; +import { LevelOrder, ImmersiveMode, LevelMode } from '../../@ohos.promptAction'; +/*** endif */ + /** * The alignment of dialog, * @@ -40,7 +51,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DialogAlignment { /** @@ -62,7 +74,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -85,7 +98,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -108,7 +122,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -131,7 +146,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -154,7 +170,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopStart, @@ -177,7 +194,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopEnd, @@ -200,7 +218,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CenterStart, @@ -223,7 +242,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CenterEnd, @@ -246,7 +266,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomStart, @@ -269,7 +290,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomEnd, } @@ -289,7 +311,8 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 11 +* @since arkts {'1.1':'11','1.2':'20'} +* @arkts 1.1&1.2 */ declare enum DialogButtonDirection { /** @@ -305,7 +328,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -322,7 +346,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HORIZONTAL = 1, @@ -339,7 +364,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VERTICAL = 2, } @@ -351,7 +377,8 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogButtonBaseOptions { /** @@ -382,7 +409,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -414,7 +442,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus?: boolean; @@ -446,7 +475,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ style?: DialogButtonStyle; @@ -475,7 +505,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -504,7 +535,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -533,7 +565,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -562,7 +595,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: VoidCallback; } @@ -594,7 +628,8 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions { /** @@ -614,7 +649,8 @@ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ primary?: boolean; } @@ -626,7 +662,8 @@ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextStyle { /** @@ -636,7 +673,8 @@ declare interface TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; } @@ -674,7 +712,8 @@ declare type LevelOrder = import('../api/@ohos.promptAction').LevelOrder; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParam { /** @@ -699,7 +738,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title?: ResourceStr; @@ -716,7 +756,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; @@ -742,7 +783,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: ResourceStr; @@ -768,7 +810,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -804,7 +847,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: VoidCallback; @@ -830,7 +874,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -856,7 +901,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -882,7 +928,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridCount?: number; @@ -901,7 +948,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -922,7 +970,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -941,7 +990,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -962,7 +1012,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -983,7 +1034,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -994,7 +1046,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -1005,7 +1058,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -1016,7 +1070,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -1027,7 +1082,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -1035,10 +1091,12 @@ declare interface AlertDialogParam { * Defines the alertDialog's corner radius. * * @type { ?(Dimension | BorderRadiuses | LocalizedBorderRadiuses) } + * @default { topLeft: '32vp', topRight: '32vp', bottomLeft: '32vp', bottomRight: '32vp' } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; @@ -1049,7 +1107,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -1060,7 +1119,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; @@ -1071,7 +1131,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -1082,7 +1143,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -1093,7 +1155,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -1104,7 +1167,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -1115,7 +1179,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: TextStyle; @@ -1127,7 +1192,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1139,7 +1205,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1150,7 +1217,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -1161,7 +1229,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -1172,7 +1241,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -1183,7 +1253,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; @@ -1195,7 +1266,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; @@ -1206,7 +1278,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; @@ -1218,7 +1291,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -1230,7 +1304,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; } @@ -1260,7 +1335,8 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { /** @@ -1295,7 +1371,8 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ confirm?: AlertDialogButtonBaseOptions; } @@ -1307,7 +1384,8 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** @@ -1317,7 +1395,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -1328,7 +1407,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -1358,7 +1438,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithButtons extends AlertDialogParam { /** @@ -1393,7 +1474,8 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ primaryButton: AlertDialogButtonBaseOptions; @@ -1429,7 +1511,8 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ secondaryButton: AlertDialogButtonBaseOptions; } @@ -1451,7 +1534,8 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AlertDialogParamWithOptions extends AlertDialogParam { /** @@ -1467,7 +1551,8 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ buttons: Array; @@ -1486,7 +1571,8 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ buttonDirection?: DialogButtonDirection; } diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index c809c09254f1853b50106f97f4de2125743f9bab..926e88cb80d19e16ca58ad5faf18746090222b1a 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, BlurStyle } from './common' +import { ResourceColor, Length, Position } from './units' +import { Font } from './units' +/*** endif */ + /** * indexer align property. * @@ -40,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum IndexerAlign { /** @@ -62,7 +69,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -85,7 +93,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -95,7 +104,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -105,7 +115,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END, } @@ -117,7 +128,8 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AlphabetIndexerOptions { /** @@ -152,7 +164,8 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrayValue: Array; /** @@ -187,7 +200,8 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selected: number; } @@ -214,7 +228,8 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AlphabetIndexerInterface { /** @@ -257,7 +272,8 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: AlphabetIndexerOptions): AlphabetIndexerAttribute; } @@ -270,7 +286,8 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; @@ -282,7 +299,8 @@ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; @@ -295,7 +313,8 @@ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; @@ -321,7 +340,8 @@ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Arra * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class AlphabetIndexerAttribute extends CommonMethod { /** @@ -361,7 +381,8 @@ declare class AlphabetIndexerAttribute extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class AnimatorAttribute extends CommonMethod { /** @@ -142,7 +156,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ state(value: AnimationStatus): AnimatorAttribute; @@ -153,7 +168,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ duration(value: number): AnimatorAttribute; @@ -164,7 +180,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ curve(value: Curve): AnimatorAttribute; @@ -175,7 +192,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ delay(value: number): AnimatorAttribute; @@ -186,7 +204,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ fillMode(value: FillMode): AnimatorAttribute; @@ -197,7 +216,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ iterations(value: number): AnimatorAttribute; @@ -208,7 +228,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ playMode(value: PlayMode): AnimatorAttribute; @@ -219,7 +240,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ motion(value: SpringMotion | FrictionMotion | ScrollMotion): AnimatorAttribute; @@ -230,7 +252,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: () => void): AnimatorAttribute; @@ -241,7 +264,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onPause(event: () => void): AnimatorAttribute; @@ -252,7 +276,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onRepeat(event: () => void): AnimatorAttribute; @@ -263,7 +288,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel(event: () => void): AnimatorAttribute; @@ -274,7 +300,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): AnimatorAttribute; @@ -285,7 +312,8 @@ declare class AnimatorAttribute extends CommonMethod { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ onFrame(event: (value: number) => void): AnimatorAttribute; } diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 81847f88d68e8072fc04554189f86043689fd299..453a88768497e4992bbae7ba143659d0f58cdfdc 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length, Position, Resource } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the badge position property. * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BadgePosition { /** @@ -81,7 +88,8 @@ declare enum BadgePosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -113,7 +121,8 @@ declare enum BadgePosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -145,7 +154,8 @@ declare enum BadgePosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, } @@ -182,7 +192,8 @@ declare enum BadgePosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeStyle { /** @@ -218,7 +229,8 @@ declare interface BadgeStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -275,6 +287,18 @@ declare interface BadgeStyle { * @since 20 */ fontSize?: number | ResourceStr; + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + fontSize?: number | string; /** * Size of a badge. @@ -330,6 +354,18 @@ declare interface BadgeStyle { * @since 20 */ badgeSize?: number | ResourceStr; + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + badgeSize?: number | string; /** * Color of the badge. @@ -364,7 +400,8 @@ declare interface BadgeStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ badgeColor?: ResourceColor; @@ -384,7 +421,8 @@ declare interface BadgeStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor; @@ -406,7 +444,8 @@ declare interface BadgeStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Length; @@ -444,6 +483,17 @@ declare interface BadgeStyle { * @since 20 */ fontWeight?: number | FontWeight | ResourceStr; + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + fontWeight?: number | FontWeight | string; } /** @@ -478,7 +528,8 @@ declare interface BadgeStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeParam { /** @@ -521,7 +572,8 @@ declare interface BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ position?: BadgePosition | Position; @@ -557,7 +609,8 @@ declare interface BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style: BadgeStyle; } @@ -598,7 +651,8 @@ declare interface BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeParamWithNumber extends BadgeParam { /** @@ -641,7 +695,8 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ count: number; @@ -685,7 +740,8 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxCount?: number; } @@ -726,7 +782,8 @@ declare interface BadgeParamWithNumber extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BadgeParamWithString extends BadgeParam { /** @@ -774,6 +831,18 @@ declare interface BadgeParamWithString extends BadgeParam { * @since 20 */ value: ResourceStr; + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value: string; } /** @@ -808,7 +877,8 @@ declare interface BadgeParamWithString extends BadgeParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BadgeInterface { /** @@ -859,7 +929,8 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: BadgeParamWithNumber): BadgeAttribute; @@ -911,7 +982,8 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: BadgeParamWithString): BadgeAttribute; } @@ -948,7 +1020,8 @@ interface BadgeInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BadgeAttribute extends CommonMethod {} @@ -1014,4 +1087,4 @@ declare const Badge: BadgeInterface; * @atomicservice * @since 11 */ -declare const BadgeInstance: BadgeAttribute; +declare const BadgeInstance: BadgeAttribute; \ No newline at end of file diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts index 19c7cf5a0f0814a37dfe4dc51bb82d7071d3a021..2ff5aeba69ac5f666380782af3ebd96d9cc460ef 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { ResourceColor } from './units'; +/*** endif */ + /** * Create Blank. * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BlankInterface { /** @@ -90,7 +96,8 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (min?: number | string): BlankAttribute; } @@ -127,7 +134,8 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BlankAttribute extends CommonMethod { /** @@ -158,7 +166,7 @@ declare class BlankAttribute extends CommonMethod { * @since 10 */ /** - * Sets the color to fill the blank.
+ * Sets the color to fill the blank. * Default value: **Color.Transparent**. * * @param { ResourceColor } value @@ -167,7 +175,8 @@ declare class BlankAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): BlankAttribute; } diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 1818a77db92979a7e9857f42cb4f43cea67d12d0..c5d10b8e0d6e9c7c701e071af6edbafd794ee3f6 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceStr, ResourceColor, Length, Font } from './units'; +import { TextOverflow, FontWeight, FontStyle, TextHeightAdaptivePolicy } from './enums'; +import { CommonConfiguration, CommonMethod, ContentModifier } from './common'; +/*** endif */ + /** * Provides a button component. * @@ -50,7 +57,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonType { /** @@ -81,7 +89,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule, @@ -113,7 +122,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Circle, @@ -145,7 +155,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -156,7 +167,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ROUNDED_RECTANGLE = 3, } @@ -178,7 +190,8 @@ declare enum ButtonType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonStyleMode { /** @@ -196,7 +209,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -215,7 +229,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMPHASIZED = 1, @@ -234,7 +249,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTUAL = 2, } @@ -247,7 +263,8 @@ declare enum ButtonStyleMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ButtonRole { /** @@ -257,7 +274,8 @@ declare enum ButtonRole { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -268,7 +286,8 @@ declare enum ButtonRole { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR = 1, } @@ -282,7 +301,8 @@ declare enum ButtonRole { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; @@ -294,7 +314,8 @@ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonConfiguration extends CommonConfiguration { @@ -305,7 +326,8 @@ declare interface ButtonConfiguration extends CommonConfiguration { /** @@ -918,7 +1040,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: ButtonType): ButtonAttribute; @@ -958,7 +1081,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stateEffect(value: boolean): ButtonAttribute; @@ -981,7 +1105,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ buttonStyle(value: ButtonStyleMode): ButtonAttribute; @@ -1004,7 +1129,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(value: ControlSize): ButtonAttribute; @@ -1017,7 +1143,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ role(value: ButtonRole): ButtonAttribute; @@ -1057,7 +1184,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): ButtonAttribute; @@ -1097,7 +1225,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): ButtonAttribute; @@ -1137,7 +1266,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): ButtonAttribute; @@ -1177,7 +1307,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): ButtonAttribute; @@ -1217,7 +1348,8 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): ButtonAttribute; @@ -1229,7 +1361,8 @@ declare class ButtonAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): ButtonAttribute; @@ -1254,6 +1387,19 @@ declare class ButtonAttribute extends CommonMethod { */ labelStyle(value: LabelStyle): ButtonAttribute; + /** + * Set button label style. + * + * @param { ButtonLabelStyle } value - The label style configuration on button. + * @returns { ButtonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + labelStyle(value: ButtonLabelStyle): ButtonAttribute; + /** * Sets the minimum zoom-out ratio of the button text. * @@ -1272,6 +1418,7 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: number | Resource): ButtonAttribute; @@ -1293,6 +1440,7 @@ declare class ButtonAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: number | Resource): ButtonAttribute; } diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index ecac65717c5fb55fb559f20f98b5ff8e78ce7ef9..4645df96a237e15aefd5dffe8704aa0ef7a43acc 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor } from './units' +import { Axis } from './enums' +/*** endif */ + /** * Provides a monthly view component to display information such as date, shift break, and schedule. * @@ -34,6 +39,7 @@ * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CalendarDay { /** @@ -54,6 +60,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ index: number; @@ -75,6 +82,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarMonth: string; @@ -94,6 +102,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDay: string; @@ -113,6 +122,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayMark: string; @@ -132,6 +142,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayMarkValue: string; @@ -151,6 +162,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -170,6 +182,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -189,6 +202,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ day: number; @@ -208,6 +222,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ isFirstOfLunar: boolean; @@ -229,6 +244,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ hasSchedule: boolean; @@ -248,6 +264,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ markLunarDay: boolean; } @@ -268,6 +285,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface MonthData { /** @@ -286,6 +304,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -305,6 +324,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -324,6 +344,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ data: CalendarDay[]; } @@ -344,6 +365,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CurrentDayStyle { /** @@ -362,6 +384,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayColor?: ResourceColor; @@ -381,6 +404,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarColor?: ResourceColor; @@ -400,6 +424,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ markLunarColor?: ResourceColor; @@ -419,6 +444,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayFontSize?: number; @@ -438,6 +464,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDayFontSize?: number; @@ -457,6 +484,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayHeight?: number; @@ -476,6 +504,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayWidth?: number; @@ -495,6 +524,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ gregorianCalendarHeight?: number; @@ -514,6 +544,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayYAxisOffset?: number; @@ -533,6 +564,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDayYAxisOffset?: number; @@ -552,6 +584,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreXAxisOffset?: number; @@ -571,6 +604,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreYAxisOffset?: number; @@ -590,6 +624,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerXAxisOffset?: number; @@ -609,6 +644,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerYAxisOffset?: number; @@ -628,6 +664,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ colSpace?: number; @@ -647,6 +684,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dailyFiveRowSpace?: number; @@ -666,6 +704,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dailySixRowSpace?: number; @@ -685,6 +724,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarHeight?: number; @@ -704,6 +744,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreWidth?: number; @@ -723,6 +764,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreLength?: number; @@ -742,6 +784,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerRadius?: number; @@ -761,6 +804,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ boundaryRowOffset?: number; @@ -780,6 +824,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ boundaryColOffset?: number; } @@ -800,6 +845,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface NonCurrentDayStyle { /** @@ -818,6 +864,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthDayColor?: ResourceColor; @@ -837,6 +884,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthLunarColor?: ResourceColor; @@ -856,6 +904,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthWorkDayMarkColor?: ResourceColor; @@ -875,6 +924,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthOffDayMarkColor?: ResourceColor; } @@ -895,6 +945,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface TodayStyle { /** @@ -913,6 +964,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedDayColor?: ResourceColor; @@ -932,6 +984,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedLunarColor?: ResourceColor; @@ -951,6 +1004,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedAreaBackgroundColor?: ResourceColor; @@ -970,6 +1024,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedAreaRadius?: number; } @@ -990,6 +1045,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface WeekStyle { /** @@ -1008,6 +1064,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekColor?: ResourceColor; @@ -1027,6 +1084,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekendDayColor?: ResourceColor; @@ -1046,6 +1104,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekendLunarColor?: ResourceColor; @@ -1065,6 +1124,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekFontSize?: number; @@ -1084,6 +1144,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekHeight?: number; @@ -1103,6 +1164,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekWidth?: number; @@ -1122,6 +1184,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekAndDayRowSpace?: number; } @@ -1142,6 +1205,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface WorkStateStyle { /** @@ -1160,6 +1224,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workDayMarkColor?: ResourceColor; @@ -1179,6 +1244,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDayMarkColor?: ResourceColor; @@ -1198,6 +1264,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workDayMarkSize?: number; @@ -1217,6 +1284,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDayMarkSize?: number; @@ -1236,6 +1304,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateWidth?: number; @@ -1255,6 +1324,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateHorizontalMovingDistance?: number; @@ -1274,6 +1344,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateVerticalMovingDistance?: number; } @@ -1294,6 +1365,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare interface CalendarSelectedDate { /** @@ -1312,6 +1384,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -1331,6 +1404,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -1350,6 +1424,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ day: number; } @@ -1370,6 +1445,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare interface CalendarRequestedData { /** @@ -1388,6 +1464,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -1407,6 +1484,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -1426,6 +1504,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentYear: number; @@ -1445,6 +1524,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentMonth: number; @@ -1464,6 +1544,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ monthState: number; } @@ -1482,6 +1563,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare class CalendarController { /** @@ -1498,6 +1580,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ constructor(); @@ -1515,6 +1598,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ backToToday(); @@ -1534,10 +1618,82 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ goTo(value: { year: number; month: number; day: number }); } +/** + * Defines the struct of CalendarRequestedMonths. + * + * @interface CalendarRequestedMonths + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ +declare interface CalendarRequestedMonths { + /** + * Default selected year/month/day. + * @type { CalendarSelectedDate } date + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + date: CalendarSelectedDate; + + /** + * Dates contained in the current month. + * + * @type { MonthData } currentData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + currentData: MonthData; + + /** + * Dates contained in the previous month. + * + * @type { MonthData } preData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + preData: MonthData; + + /** + * Dates contained in the next month. + * + * @type { MonthData } nextData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + nextData: MonthData; + + /** + * Calendar controller. + * + * @type { ?CalendarController } controller + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ + controller?: CalendarController; +} + /** * Calendar Interface * @@ -1554,6 +1710,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CalendarInterface { /** @@ -1574,6 +1731,7 @@ interface CalendarInterface { * @systemapi * @form * @since 10 + * @deprecated since 20 */ (value: { date: { year: number; month: number; day: number }; @@ -1594,6 +1752,7 @@ interface CalendarInterface { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare class CalendarAttribute { /** @@ -1614,6 +1773,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ showLunar(value: boolean): CalendarAttribute; @@ -1635,6 +1795,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ showHoliday(value: boolean): CalendarAttribute; @@ -1656,6 +1817,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ needSlide(value: boolean): CalendarAttribute; @@ -1677,6 +1839,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ startOfWeek(value: number): CalendarAttribute; @@ -1698,6 +1861,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDays(value: number): CalendarAttribute; @@ -1719,6 +1883,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ direction(value: Axis): CalendarAttribute; @@ -1740,6 +1905,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentDayStyle(value: CurrentDayStyle): CalendarAttribute; @@ -1761,6 +1927,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute; @@ -1782,6 +1949,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ todayStyle(value: TodayStyle): CalendarAttribute; @@ -1803,6 +1971,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekStyle(value: WeekStyle): CalendarAttribute; @@ -1824,6 +1993,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateStyle(value: WorkStateStyle): CalendarAttribute; @@ -1845,6 +2015,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ onSelectChange(event: (event: CalendarSelectedDate) => void): CalendarAttribute; @@ -1866,6 +2037,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ onRequestData( event: (event: CalendarRequestedData) => void, @@ -1886,6 +2058,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare const Calendar: CalendarInterface; @@ -1903,5 +2076,6 @@ declare const Calendar: CalendarInterface; * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare const CalendarInstance: CalendarAttribute; diff --git a/api/@internal/component/ets/calendar_picker.d.ts b/api/@internal/component/ets/calendar_picker.d.ts index 2ae7c8c787cde6ac58eb41bc6fa7850ffb1c0d2e..9fd4a0955e994af0306574cb7fe7ee1554828ee3 100644 --- a/api/@internal/component/ets/calendar_picker.d.ts +++ b/api/@internal/component/ets/calendar_picker.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { CommonMethod, PickerTextStyle, Callback, BlurStyle, PickerDialogButtonStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, DateRange, + BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional } from './common' +import { Offset, VoidCallback, ResourceColor } from './units' +/*** endif */ + /** * The type of alignment between entry and calendar. * @enum {number} @@ -31,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CalendarAlign { /** @@ -45,7 +53,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, /** @@ -59,7 +68,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, /** @@ -73,7 +83,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2 } @@ -91,7 +102,8 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CalendarOptions { /** @@ -107,7 +119,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hintRadius?: number | Resource; @@ -124,7 +137,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: Date; @@ -135,7 +149,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -146,7 +161,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; @@ -157,7 +173,8 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disabledDateRange?: DateRange[]; } @@ -175,12 +192,13 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CalendarPickerInterface { /** * Defines the CalendarPicker constructor. - * @param { CalendarOptions } options - the option of th calendarPicker. + * @param { CalendarOptions } options - the option of the calendarPicker. * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -188,12 +206,13 @@ interface CalendarPickerInterface { */ /** * Defines the CalendarPicker constructor. - * @param { CalendarOptions } options - the option of th calendarPicker. + * @param { CalendarOptions } options - the option of the calendarPicker. * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: CalendarOptions): CalendarPickerAttribute; } @@ -211,7 +230,8 @@ interface CalendarPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CalendarPickerAttribute extends CommonMethod { /** @@ -231,10 +251,11 @@ declare class CalendarPickerAttribute extends CommonMethod } alignType - The type of alignment between entry and calendar dialog. @@ -243,7 +264,8 @@ declare class CalendarPickerAttribute extends CommonMethod, offset?: Offset): CalendarPickerAttribute; @@ -262,7 +284,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -302,18 +326,20 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; - /** + /** * Callback for selected date changed. * @param { Optional> } callback - callback for selected date changed. * @returns { CalendarPickerAttribute } the attribute of the CalendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional>): CalendarPickerAttribute; @@ -325,7 +351,8 @@ declare class CalendarPickerAttribute extends CommonMethod; @@ -396,7 +425,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: VoidCallback; @@ -422,7 +452,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange?: Callback; @@ -443,7 +474,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -464,7 +496,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -475,7 +508,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -486,7 +520,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -497,7 +532,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -508,7 +544,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -529,7 +566,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: VoidCallback; @@ -550,7 +588,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: VoidCallback; @@ -571,7 +610,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: VoidCallback; @@ -592,7 +632,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: VoidCallback; @@ -603,7 +644,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -615,7 +657,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -627,7 +670,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -639,7 +683,8 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ markToday?: boolean; } @@ -655,23 +700,25 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CalendarPickerDialog { /** * Invoking method display. - * @param { CalendarDialogOptions } options - the option of th calendarPicker. + * @param { CalendarDialogOptions } options - the option of the calendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Invoking method display. - * @param { CalendarDialogOptions } options - the option of th calendarPicker. + * @param { CalendarDialogOptions } options - the option of the calendarPicker. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static show(options?: CalendarDialogOptions): void; } diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 8821d237aae769bbb3b14515abdd94b2cb83a5e1..9702787cd952b36643e0ad3fa4cfd6dceea3650c 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Callback, PixelMap } from './common'; +import { FrameNode } from '../FrameNode'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { Matrix2D } from './matrix2d'; +import { VoidCallback, LengthMetricsUnit, LengthMetrics } from './units'; +import { Size } from '../Graphics'; +/*** endif */ + /** * Import the drawing canvas type object for Canvas. * @@ -73,7 +82,8 @@ declare type DrawingCanvas = import('../api/@ohos.graphics.drawing').default.Can * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasFillRule = "evenodd" | "nonzero"; @@ -125,7 +135,8 @@ declare type CanvasFillRule = "evenodd" | "nonzero"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasLineCap = "butt" | "round" | "square"; @@ -189,7 +200,8 @@ declare type CanvasLineCap = "butt" | "round" | "square"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasLineJoin = "bevel" | "miter" | "round"; @@ -237,7 +249,8 @@ declare type CanvasLineJoin = "bevel" | "miter" | "round"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; @@ -301,7 +314,8 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; @@ -369,7 +383,8 @@ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; @@ -417,7 +432,8 @@ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideogra * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ImageSmoothingQuality = "high" | "low" | "medium"; @@ -460,7 +476,8 @@ declare type FrameNode = import('../api/arkui/FrameNode').FrameNode; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasGradient { /** @@ -503,7 +520,8 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addColorStop(offset: number, color: string): void; @@ -550,7 +568,8 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasPath { /** @@ -609,7 +628,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; @@ -661,7 +681,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; @@ -717,7 +738,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; @@ -749,7 +771,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closePath(): void; @@ -821,7 +844,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ellipse( x: number, @@ -870,7 +894,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineTo(x: number, y: number): void; @@ -910,7 +935,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveTo(x: number, y: number): void; @@ -958,7 +984,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; @@ -1006,7 +1033,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rect(x: number, y: number, w: number, h: number): void; @@ -1062,7 +1090,8 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Path2D extends CanvasPath { /** @@ -1101,7 +1130,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addPath(path: Path2D, transform?: Matrix2D): void; @@ -1133,19 +1163,21 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** * Create an empty path object. * - * @param { LengthMetricsUnit } [unit] - the unit mode + * @param { LengthMetricsUnit } unit - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit: LengthMetricsUnit); @@ -1181,7 +1213,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path2D); @@ -1189,12 +1222,13 @@ declare class Path2D extends CanvasPath { * Create a copy of a path object * * @param { Path2D } path - Path object to be copied - * @param { LengthMetricsUnit } [unit] - the unit mode + * @param { LengthMetricsUnit } unit - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path2D, unit: LengthMetricsUnit); @@ -1230,7 +1264,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(d: string); @@ -1238,12 +1273,13 @@ declare class Path2D extends CanvasPath { * Create a new path according to the description. * * @param { string } description - Indicates the path string that compiles with the SVG path description specifications. - * @param { LengthMetricsUnit } [unit] - the unit mode + * @param { LengthMetricsUnit } unit - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(description: string, unit: LengthMetricsUnit); } @@ -1280,7 +1316,8 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CanvasPattern { /** @@ -1315,7 +1352,8 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(transform?: Matrix2D): void; } @@ -1352,7 +1390,8 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMetrics { /** @@ -1395,7 +1434,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxAscent: number; @@ -1439,7 +1479,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxDescent: number; @@ -1483,7 +1524,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxLeft: number; @@ -1527,7 +1569,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly actualBoundingBoxRight: number; @@ -1571,7 +1614,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly alphabeticBaseline: number; @@ -1615,7 +1659,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly emHeightAscent: number; @@ -1659,7 +1704,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly emHeightDescent: number; @@ -1703,7 +1749,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontBoundingBoxAscent: number; @@ -1747,7 +1794,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontBoundingBoxDescent: number; @@ -1791,7 +1839,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly hangingBaseline: number; @@ -1835,7 +1884,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly ideographicBaseline: number; @@ -1875,7 +1925,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly width: number; @@ -1915,7 +1966,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly height: number; } @@ -1948,7 +2000,8 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageBitmap { /** @@ -1991,6 +2044,19 @@ declare class ImageBitmap { */ readonly height: number; + /** + * Indicates the height of the CSS pixel unit of ImageData. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * Indicates the width of the CSS pixel unit of ImageData. * @@ -2031,6 +2097,19 @@ declare class ImageBitmap { */ readonly width: number; + /** + * Indicates the width of the CSS pixel unit of ImageData. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Releases all graphics resources associated with an ImageBitmap. * @@ -2059,7 +2138,8 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; @@ -2149,6 +2229,19 @@ declare class ImageBitmap { * @since 12 */ constructor(data: PixelMap, unit: LengthMetricsUnit); + + /** + * Create an ImageBitmap object based on the transferred image path or PixelMap object. + * + * @param { PixelMap | string } src - image path or PixelMap object + * @param { LengthMetricsUnit } [unit] - the unit mode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(src: PixelMap | string, unit?: LengthMetricsUnit); } /** @@ -2179,7 +2272,8 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageData { /** @@ -2222,6 +2316,19 @@ declare class ImageData { */ readonly data: Uint8ClampedArray; + /** + * Array containing image pixel data + * + * @return { Uint8ClampedArray } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get data(): Uint8ClampedArray; + /** * Width of the image. * @@ -2262,6 +2369,19 @@ declare class ImageData { */ readonly height: number; + /** + * Height of the image. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * Height of the image. * @@ -2302,6 +2422,19 @@ declare class ImageData { */ readonly width: number; + /** + * Width of the image. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Create an ImageData object based on the input parameters. * @@ -2357,7 +2490,8 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); } @@ -2390,7 +2524,8 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RenderingContextSettings { /** @@ -2429,6 +2564,32 @@ declare class RenderingContextSettings { */ antialias?: boolean; + /** + * Get the status whether anti-aliasing is enabled for canvas. The default value is false. + * + * @return { boolean | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get antialias(): boolean | undefined; + + /** + * Set the status whether anti-aliasing is enabled for canvas. The default value is false. + * + * @param { boolean | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set antialias(antialias: boolean | undefined); + /** * Create an RenderingContextSettings object based on the antialias and alpha. * @@ -2461,7 +2622,8 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(antialias?: boolean); } @@ -2498,7 +2660,8 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasRenderer extends CanvasPath { /** @@ -2513,6 +2676,30 @@ declare class CanvasRenderer extends CanvasPath { */ letterSpacing: LengthMetrics | string; + /** + * Get spacing for letter. + * + * @return { LengthMetrics | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get letterSpacing(): LengthMetrics | string; + + /** + * Set spacing for letter. + * + * @param { LengthMetrics | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set letterSpacing(letterSpacing: LengthMetrics | string); + /** * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. @@ -2557,6 +2744,34 @@ declare class CanvasRenderer extends CanvasPath { */ globalAlpha: number; + /** + * Get transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). + * If the value is out of range, the assignment is invalid. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get globalAlpha(): number; + + /** + * Set transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). + * If the value is out of range, the assignment is invalid. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set globalAlpha(globalAlpha: number); + /** * Type of composition operation applied when drawing a new shape. The following types are supported: * source-over: (Default) Draws a new drawing on top of an existing canvas context. @@ -2653,6 +2868,60 @@ declare class CanvasRenderer extends CanvasPath { */ globalCompositeOperation: string; + /** + * Get the type of composition operation applied when drawing a new shape. The following types are supported: + * source-over: (Default) Draws a new drawing on top of an existing canvas context. + * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. + * Everything else is transparent. + * source-out: Draws a new drawing where it does not overlap with the existing canvas content. + * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. + * destination-over: Draws a new graphic behind the existing canvas content. + * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. + * Everything else is transparent. + * destination-out: Existing content remains where the new drawing does not overlap. + * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, + * which is drawn behind the canvas content. + * lighter: The color of two overlapping shapes is determined by adding the color values. + * copy: Only new graphics are displayed. + * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get globalCompositeOperation(): string; + + /** + * Set the type of composition operation applied when drawing a new shape. The following types are supported: + * source-over: (Default) Draws a new drawing on top of an existing canvas context. + * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. + * Everything else is transparent. + * source-out: Draws a new drawing where it does not overlap with the existing canvas content. + * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. + * destination-over: Draws a new graphic behind the existing canvas content. + * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. + * Everything else is transparent. + * destination-out: Existing content remains where the new drawing does not overlap. + * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, + * which is drawn behind the canvas content. + * lighter: The color of two overlapping shapes is determined by adding the color values. + * copy: Only new graphics are displayed. + * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set globalCompositeOperation(globalCompositeOperation: string); + /** * Draw an image on a canvas * @@ -2693,7 +2962,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void; @@ -2745,7 +3015,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void; @@ -2813,7 +3084,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ drawImage( image: ImageBitmap | PixelMap, @@ -2855,7 +3127,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ beginPath(): void; @@ -2891,7 +3164,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clip(fillRule?: CanvasFillRule): void; @@ -2931,7 +3205,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clip(path: Path2D, fillRule?: CanvasFillRule): void; @@ -2967,7 +3242,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(fillRule?: CanvasFillRule): void; @@ -3007,7 +3283,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(path: Path2D, fillRule?: CanvasFillRule): void; @@ -3079,6 +3356,19 @@ declare class CanvasRenderer extends CanvasPath { */ stroke(path: Path2D): void; + /** + * Draws the specified path according to the current stroke style + * + * @param { Path2D } [path] - Specified stroke path object + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stroke(path?: Path2D): void; + /** * Attributes that describe the fill color and style. The options are as follows: * color: Color String @@ -3134,37 +3424,71 @@ declare class CanvasRenderer extends CanvasPath { fillStyle: string | number | CanvasGradient | CanvasPattern; /** - * Attributes of the stroke color and style. The options are as follows: - * color: Color String - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * Get the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: * - * @type { string | CanvasGradient | CanvasPattern } - * @default #000000 (black) - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Attributes of the stroke color and style. The options are as follows: - * color: Color String + * @return { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * - * @type { string | CanvasGradient | CanvasPattern } - * @default #000000 (black) * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form - * @since 9 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + get fillStyle(): string | number | CanvasGradient | CanvasPattern; + /** - * Attributes of the stroke color and style. The options are as follows: + * Set the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: * - * @type { string | number | CanvasGradient | CanvasPattern } + * @param { string | number | CanvasGradient | CanvasPattern } * string: Color String. * number: Indicates the color with number. * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * @default #000000 (black) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set fillStyle(fillStyle: string | number | CanvasGradient | CanvasPattern); + + /** + * Attributes of the stroke color and style. The options are as follows: + * color: Color String + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * + * @type { string | CanvasGradient | CanvasPattern } + * @default #000000 (black) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Attributes of the stroke color and style. The options are as follows: + * color: Color String + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * + * @type { string | CanvasGradient | CanvasPattern } + * @default #000000 (black) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Attributes of the stroke color and style. The options are as follows: + * + * @type { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @default #000000 (black) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -3187,6 +3511,42 @@ declare class CanvasRenderer extends CanvasPath { */ strokeStyle: string | number | CanvasGradient | CanvasPattern; + /** + * Get the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. + * The options are as follows: + * + * @return { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get strokeStyle(): string | number | CanvasGradient | CanvasPattern; + + /** + * Set the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. + * The options are as follows: + * + * @param { string | number | CanvasGradient | CanvasPattern } + * string: Color String. + * number: Indicates the color with number. + * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. + * CanvasPattern: Template object. For details, see {@link CanvasPattern}. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set strokeStyle(strokeStyle: string | number | CanvasGradient | CanvasPattern); + /** * Creates a linear gradient object that is specified along the parameter coordinates * @@ -3235,7 +3595,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; @@ -3299,7 +3660,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | null; @@ -3359,7 +3721,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; @@ -3386,7 +3749,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createConicGradient( startAngle: number, @@ -3498,6 +3862,64 @@ declare class CanvasRenderer extends CanvasPath { */ filter: string; + /** + * Provides filter effects such as blur and grayscale. You can get the following filter effects: + * blur(): Adds a Gaussian blur effect to the drawing + * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. + * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. + * When the value is 100%, there is no change in the image. + * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. + * When the value is 0%, there is no change in the image. + * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. + * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, + * the image is completely inverted. When the value is 0%, there is no change in the image. + * opacity(): Transparency of the image. At 0%, the image is completely transparent. + * When the value is 100%, there is no change in the image. + * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. + * When the value is 100%, there is no change in the image. + * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. + * When the value is 0%, there is no change in the image. + * none: Turn off filter effects + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get filter(): string; + + /** + * Provides filter effects such as blur and grayscale. You can set the following filter effects: + * blur(): Adds a Gaussian blur effect to the drawing + * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. + * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. + * When the value is 100%, there is no change in the image. + * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. + * When the value is 0%, there is no change in the image. + * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. + * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, + * the image is completely inverted. When the value is 0%, there is no change in the image. + * opacity(): Transparency of the image. At 0%, the image is completely transparent. + * When the value is 100%, there is no change in the image. + * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. + * When the value is 100%, there is no change in the image. + * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. + * When the value is 0%, there is no change in the image. + * none: Turn off filter effects + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set filter(filter: string); + /** * Creates a new, empty ImageData object of the specified size * @@ -3538,7 +3960,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ createImageData(sw: number, sh: number): ImageData; @@ -3546,7 +3969,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -3555,7 +3978,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -3565,7 +3988,7 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3576,15 +3999,16 @@ declare class CanvasRenderer extends CanvasPath { * From an existing ImageData object, copy an object with the same width and height as the image. * The image content is not copied. * - * @param { ImageData } imagedata - ImageData object to be copied. + * @param { ImageData } imageData - ImageData object to be copied. * @returns { ImageData } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - createImageData(imagedata: ImageData): ImageData; + createImageData(imageData: ImageData): ImageData; /** * Obtains the pixel data of a specified area on the current canvas. @@ -3634,7 +4058,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; @@ -3672,14 +4097,15 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap; /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3688,7 +4114,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3698,7 +4124,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3709,21 +4135,22 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; + putImageData(imageData: ImageData, dx: number | string, dy: number | string): void; /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3740,7 +4167,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3758,7 +4185,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3777,7 +4204,7 @@ declare class CanvasRenderer extends CanvasPath { /** * Draws the specified ImageData object onto the canvas * - * @param { ImageData } imagedata - ImageData object to be drawn. + * @param { ImageData } imageData - ImageData object to be drawn. * @param { number | string } dx - Position offset of the source image data in the target canvas (the offset in the x-axis direction). * @param { number | string } dy - Position offset of the source image data in the target canvas (the offset in the y-axis direction). * @param { number | string } dirtyX - Position of the upper left corner of the rectangular area in the source image data. @@ -3792,10 +4219,11 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ putImageData( - imagedata: ImageData, + imageData: ImageData, dx: number | string, dy: number | string, dirtyX: number | string, @@ -3848,6 +4276,34 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingEnabled: boolean; + /** + * Get the status whether to smooth the image. The value true indicates that the image is smooth. + * The value false indicates that the image is not smooth. + * + * @return { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get imageSmoothingEnabled(): boolean; + + /** + * Set the status whether to smooth the image. The value true indicates that the image is smooth. + * The value false indicates that the image is not smooth. + * + * @param { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set imageSmoothingEnabled(imageSmoothingEnabled: boolean); + /** * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. * @@ -3888,6 +4344,32 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingQuality: ImageSmoothingQuality; + /** + * Get the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. + * + * @return { ImageSmoothingQuality } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get imageSmoothingQuality(): ImageSmoothingQuality; + + /** + * Set the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. + * + * @param { ImageSmoothingQuality } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set imageSmoothingQuality(imageSmoothingQuality: ImageSmoothingQuality); + /** * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. * @@ -3927,6 +4409,32 @@ declare class CanvasRenderer extends CanvasPath { * @since 11 */ lineCap: CanvasLineCap; + + /** + * Get the line segment endpoint attribute. For details, see {@link CanvasLineCap}. + * + * @return { CanvasLineCap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineCap(): CanvasLineCap; + + /** + * Set the line segment endpoint attribute. For details, see {@link CanvasLineCap}. + * + * @param { CanvasLineCap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineCap(lineCap: CanvasLineCap); /** * Dotted line offset attribute. @@ -3968,6 +4476,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineDashOffset: number; + /** + * Get the dotted line offset attribute. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineDashOffset(): number; + + /** + * Set the dotted line offset attribute. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineDashOffset(lineDashOffset: number); + /** * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. * @@ -4008,6 +4542,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineJoin: CanvasLineJoin; + /** + * Get the line segment connection point attribute. For details, see {@link CanvasLineJoin}. + * + * @return { CanvasLineJoin } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineJoin(): CanvasLineJoin; + + /** + * Set the line segment connection point attribute. For details, see {@link CanvasLineJoin}. + * + * @param { CanvasLineJoin } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineJoin(lineJoin: CanvasLineJoin); + /** * Line thickness attribute. The value cannot be 0 or a negative number. * @@ -4048,6 +4608,32 @@ declare class CanvasRenderer extends CanvasPath { */ lineWidth: number; + /** + * Get the line thickness attribute. The value cannot be 0 or a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get lineWidth(): number; + + /** + * Set the line thickness attribute. The value cannot be 0 or a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set lineWidth(lineWidth: number); + /** * The value of this parameter cannot be 0 or a negative number. * @@ -4088,6 +4674,32 @@ declare class CanvasRenderer extends CanvasPath { */ miterLimit: number; + /** + * Get the value of this parameter cannot be 0 or a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get miterLimit(): number; + + /** + * Set the value of this parameter cannot be 0 or a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set miterLimit(miterLimit: number); + /** * Gets the current segment style. * @@ -4120,7 +4732,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getLineDash(): number[]; @@ -4160,7 +4773,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setLineDash(segments: number[]): void; @@ -4208,7 +4822,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clearRect(x: number, y: number, w: number, h: number): void; @@ -4256,7 +4871,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillRect(x: number, y: number, w: number, h: number): void; @@ -4304,7 +4920,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeRect(x: number, y: number, w: number, h: number): void; @@ -4348,6 +4965,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowBlur: number; + /** + * Get the shadow blur radius. The value cannot be a negative number. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowBlur(): number; + + /** + * Set the shadow blur radius. The value cannot be a negative number. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowBlur(shadowBlur: number); + /** * Shadow color. * @@ -4388,6 +5031,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowColor: string; + /** + * Get the shadow color. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowColor(): string; + + /** + * Set the shadow color. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowColor(shadowColor: string); + /** * Horizontal offset distance of the shadow. * @@ -4406,27 +5075,53 @@ declare class CanvasRenderer extends CanvasPath { * @since 9 */ /** - * Horizontal offset distance of the shadow. + * Horizontal offset distance of the shadow. + * + * @type { number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal offset distance of the shadow. + * + * @type { number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + shadowOffsetX: number; + + /** + * Get the horizontal offset distance of the shadow. * - * @type { number } - * @default 0 + * @return { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @since 10 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + get shadowOffsetX(): number; + /** - * Horizontal offset distance of the shadow. + * Set the horizontal offset distance of the shadow. * - * @type { number } - * @default 0 + * @param { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - shadowOffsetX: number; + set shadowOffsetX(shadowOffsetX: number); /** * Vertical offset distance of the shadow. @@ -4468,6 +5163,32 @@ declare class CanvasRenderer extends CanvasPath { */ shadowOffsetY: number; + /** + * Get the vertical offset distance of the shadow. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get shadowOffsetY(): number; + + /** + * Set the vertical offset distance of the shadow. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set shadowOffsetY(shadowOffsetY: number); + /** * Top of the stack pop-up state in the drawing state stack * @@ -4496,7 +5217,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ restore(): void; @@ -4528,7 +5250,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ save(): void; @@ -4576,7 +5299,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillText(text: string, x: number, y: number, maxWidth?: number): void; @@ -4616,7 +5340,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measureText(text: string): TextMetrics; @@ -4664,7 +5389,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeText(text: string, x: number, y: number, maxWidth?: number): void; @@ -4708,6 +5434,32 @@ declare class CanvasRenderer extends CanvasPath { */ direction: CanvasDirection; + /** + * Get the text drawing direction. For details, see {@link CanvasDirection}. + * + * @return { CanvasDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get direction(): CanvasDirection; + + /** + * Set the text drawing direction. For details, see {@link CanvasDirection}. + * + * @param { CanvasDirection } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set direction(direction: CanvasDirection); + /** * Font style. * @@ -4748,6 +5500,32 @@ declare class CanvasRenderer extends CanvasPath { */ font: string; + /** + * Get the font style. + * + * @return { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get font(): string; + + /** + * Set the font style. + * + * @param { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set font(font: string); + /** * Text alignment mode. For details, see {@link CanvasTextAlign}. * @@ -4788,6 +5566,32 @@ declare class CanvasRenderer extends CanvasPath { */ textAlign: CanvasTextAlign; + /** + * Get the text alignment mode. For details, see {@link CanvasTextAlign}. + * + * @return { CanvasTextAlign } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get textAlign(): CanvasTextAlign; + + /** + * Set the text alignment mode. For details, see {@link CanvasTextAlign}. + * + * @param { CanvasTextAlign } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set textAlign(textAlign: CanvasTextAlign); + /** * Text baseline. For details, see {@link CanvasTextBaseline}. * @@ -4828,6 +5632,32 @@ declare class CanvasRenderer extends CanvasPath { */ textBaseline: CanvasTextBaseline; + /** + * Get the text baseline. For details, see {@link CanvasTextBaseline}. + * + * @return { CanvasTextBaseline } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get textBaseline(): CanvasTextBaseline; + + /** + * Set the text baseline. For details, see {@link CanvasTextBaseline}. + * + * @param { CanvasTextBaseline } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set textBaseline(textBaseline: CanvasTextBaseline); + /** * Obtains the currently applied transformation matrix. * @@ -4860,7 +5690,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTransform(): Matrix2D; @@ -4892,7 +5723,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resetTransform(): void; @@ -4932,7 +5764,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(angle: number): void; @@ -4972,7 +5805,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(x: number, y: number): void; @@ -5032,7 +5866,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -5072,7 +5907,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setTransform(transform?: Matrix2D): void; @@ -5132,7 +5968,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -5172,7 +6009,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(x: number, y: number): void; @@ -5198,7 +6036,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setPixelMap(value?: PixelMap): void; @@ -5234,7 +6073,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferFromImageBitmap(bitmap: ImageBitmap): void; @@ -5244,7 +6084,8 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ saveLayer(): void; @@ -5254,18 +6095,20 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restoreLayer(): void; /** - * Clear the backing buffer, drawing state stack, any defined paths, and styles. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Clear the backing buffer, drawing state stack, any defined paths, and styles. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ reset(): void; } @@ -5301,7 +6144,8 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasRenderingContext2D extends CanvasRenderer { /** @@ -5344,6 +6188,20 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly height: number; + /** + * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. + * + * @return { number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + /** * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. * @@ -5384,6 +6242,20 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly width: number; + /** + * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. + * + * @return { number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + /** * Frame node of the canvas. The default value is null. * @@ -5396,6 +6268,18 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly canvas: FrameNode; + /** + * Frame node of the canvas. The default value is null. + * + * @return { FrameNode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get canvas(): FrameNode; + /** * Generate a character string in the data url format. * @@ -5444,6 +6328,22 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; + /** + * Generate a character string in the data url format. + * + * @param { string } [type] - Image format. The default value is image/png. + * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. + * If the value is out of the range, the default value 0.92 is used. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + toDataURL(type?: string, quality?: number): string; + /** * Start image analyzer. * @@ -5454,7 +6354,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -5462,7 +6363,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * Stop image analyzer. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopImageAnalyzer(): void; @@ -5511,7 +6413,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(settings?: RenderingContextSettings, unit?: LengthMetricsUnit); @@ -5527,7 +6430,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'onAttach', callback: Callback): void; @@ -5543,7 +6447,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'onAttach', callback?: Callback): void; @@ -5559,7 +6464,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'onDetach', callback: Callback): void; @@ -5575,7 +6481,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'onDetach', callback?: Callback): void; } @@ -5612,7 +6519,8 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { /** @@ -5663,6 +6571,22 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; + /** + * Generate a character string in the data url format. + * + * @param { string } [type] - Image format. The default value is image/png. + * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. + * If the value is out of the range, the default value 0.92 is used. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + toDataURL(type?: string, quality?: number): string; + /** * transfer the content to ImageBitmap * @@ -5695,7 +6619,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferToImageBitmap(): ImageBitmap; @@ -5754,7 +6679,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); } @@ -5790,7 +6716,8 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class OffscreenCanvas { /** @@ -5829,6 +6756,32 @@ declare class OffscreenCanvas { */ height: number; + /** + * Get the height of the off-screen canvas. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get height(): number; + + /** + * Set the height of the off-screen canvas. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set height(height: number); + /** * Width of the off-screen canvas. * @@ -5865,6 +6818,32 @@ declare class OffscreenCanvas { */ width: number; + /** + * Get the width of the off-screen canvas. + * + * @return { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + get width(): number; + + /** + * Set the width of the off-screen canvas. + * + * @param { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + set width(width: number); + /** * Exports rendered content as an ImageBitmap object * @@ -5897,7 +6876,8 @@ declare class OffscreenCanvas { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transferToImageBitmap(): ImageBitmap; @@ -5922,7 +6902,8 @@ declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getContext(contextType: "2d", options?: RenderingContextSettings): OffscreenCanvasRenderingContext2D; @@ -5971,7 +6952,7 @@ declare class OffscreenCanvas { * * @param { number } width - Width of the off-screen canvas. * @param { number } height - Height of the off-screen canvas. - * @param { LengthMetricsUnit } [unit] - the unit mode + * @param { LengthMetricsUnit } unit - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -5979,6 +6960,21 @@ declare class OffscreenCanvas { * @since 12 */ constructor(width: number, height: number, unit: LengthMetricsUnit); + + /** + * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. + * + * @param { number } width - Width of the off-screen canvas. + * @param { number } height - Height of the off-screen canvas. + * @param { LengthMetricsUnit } [unit] - the unit mode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(width: number, height: number, unit?: LengthMetricsUnit); } /** @@ -6020,7 +7016,8 @@ declare interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DrawingRenderingContext { @@ -6031,7 +7028,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get size(): Size; @@ -6052,7 +7050,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; @@ -6063,7 +7062,8 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit?: LengthMetricsUnit); } @@ -6100,7 +7100,8 @@ declare class DrawingRenderingContext { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CanvasInterface { /** @@ -6150,7 +7151,8 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (context?: CanvasRenderingContext2D | DrawingRenderingContext): CanvasAttribute; @@ -6162,7 +7164,8 @@ interface CanvasInterface { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (context: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions: ImageAIOptions): CanvasAttribute; } @@ -6199,7 +7202,8 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CanvasAttribute extends CommonMethod { /** @@ -6249,7 +7253,8 @@ declare class CanvasAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onReady(event: VoidCallback): CanvasAttribute; @@ -6260,7 +7265,8 @@ declare class CanvasAttribute extends CommonMethod { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): CanvasAttribute; } diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts index 10261869716ca770c8a0fa1bf81aa97e006c9bd2..fefa89908949d86f8f5e5e4975525aec880d2c87 100644 --- a/api/@internal/component/ets/checkbox.d.ts +++ b/api/@internal/component/ets/checkbox.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Optional } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor, MarkStyle } from './units'; +import { CheckBoxShape } from './enums'; +/*** endif */ + /** * Defines the options of Checkbox. * @@ -50,7 +57,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxOptions { /** @@ -85,7 +93,8 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -121,7 +130,8 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group?: string; @@ -132,7 +142,8 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorBuilder?: CustomBuilder; } @@ -145,7 +156,8 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckBoxConfiguration extends CommonConfiguration { /** @@ -155,7 +167,8 @@ declare interface CheckBoxConfiguration extends CommonConfiguration; } @@ -214,7 +229,8 @@ declare interface CheckBoxConfiguration extends CommonConfiguration void; @@ -308,7 +326,8 @@ declare type OnCheckboxChangeCallback = (value: boolean) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CheckboxAttribute extends CommonMethod { /** @@ -347,7 +366,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ select(value: boolean): CheckboxAttribute; @@ -360,7 +380,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ select(isSelected: Optional): CheckboxAttribute; @@ -400,7 +421,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): CheckboxAttribute; @@ -413,7 +435,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(resColor: Optional): CheckboxAttribute; @@ -436,7 +459,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape(value: CheckBoxShape): CheckboxAttribute; @@ -449,7 +473,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shape(shape: Optional): CheckboxAttribute; @@ -470,7 +495,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor(value: ResourceColor): CheckboxAttribute; @@ -482,7 +508,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor(resColor: Optional): CheckboxAttribute; @@ -503,7 +530,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mark(value: MarkStyle): CheckboxAttribute; @@ -515,7 +543,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mark(style: Optional): CheckboxAttribute; @@ -567,7 +596,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: OnCheckboxChangeCallback): CheckboxAttribute; @@ -580,7 +610,8 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): CheckboxAttribute; @@ -592,7 +623,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): CheckboxAttribute; @@ -604,7 +636,8 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): CheckboxAttribute; } diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 7d33b8fd86c87ac39076badec21bfbc102fb1940..70515b7c98aea8d104c9c89a57b2319100284b4d 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Optional } from './common'; +import { ResourceColor, MarkStyle } from './units'; +import { CheckBoxShape } from './enums'; +/*** endif */ + /** * CheckboxGroup SelectStatus * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SelectStatus { /** @@ -81,7 +88,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, /** @@ -112,7 +120,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Part, /** @@ -143,7 +152,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -180,7 +190,8 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxGroupOptions { /** @@ -215,7 +226,8 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group?: string; } @@ -252,7 +264,8 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CheckboxGroupResult { /** @@ -287,7 +300,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: Array; /** @@ -322,7 +336,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status: SelectStatus; } @@ -359,7 +374,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CheckboxGroupInterface { /** @@ -398,7 +414,8 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } @@ -413,10 +430,56 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => void; +/** + * CheckBoxGroupConfiguration used by content modifier. + * + * @extends CommonConfiguration + * @interface CheckBoxGroupConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ +declare interface CheckBoxGroupConfiguration extends CommonConfiguration { + /** + * Current name of checkboxgroup. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + name: string; + + /** + * Defines the select status of CheckboxGroup. + * + * @type { SelectStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + status: SelectStatus; + + /** + * Trigger checkboxgroup select change. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + triggerChange: Callback; +} + /** * Defines the attribute functions of CheckboxGroup. * @@ -449,7 +512,8 @@ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => voi * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CheckboxGroupAttribute extends CommonMethod { /** @@ -488,7 +552,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -541,7 +607,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -575,7 +643,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -608,7 +678,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -664,7 +736,6 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -698,7 +771,8 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; + + /** + * Set the content modifier of checkboxgroup. + * + * @param { Optional> } modifier - The content modifier of checkboxgroup. + * @returns { CheckboxGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + contentModifier(modifier: Optional>): CheckboxGroupAttribute; } /** diff --git a/api/@internal/component/ets/circle.d.ts b/api/@internal/component/ets/circle.d.ts index 42e6cc834a3f90dea4e9c7c544bb2a43d7a7b38a..b9470b4d8a889e7ff3dfd6cc4612e90937d03058 100644 --- a/api/@internal/component/ets/circle.d.ts +++ b/api/@internal/component/ets/circle.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod,CommonMethod } from './common'; +/*** endif */ + /** * Defines circle options for Circle component. * @@ -50,7 +54,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CircleOptions { /** @@ -98,6 +103,18 @@ declare interface CircleOptions { * @since 20 */ width?: Length; + /** + * Defines the width property. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: string | number; /** * Defines the height property. @@ -144,6 +161,18 @@ declare interface CircleOptions { * @since 20 */ height?: Length; + /** + * Defines the height property. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: string | number; } /** @@ -294,7 +323,8 @@ interface CircleInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CircleAttribute extends CommonShapeMethod {} @@ -361,3 +391,30 @@ declare const Circle: CircleInterface; * @since 11 */ declare const CircleInstance: CircleAttribute; + +/** + * Defines circle component. + * + * @interface CircleInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface CircleInterface { + /** + * Set the options for circle component. + * + * @param { CircleOptions } [value] - options to create circle component. + * @returns { CircleAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (value?: CircleOptions): CircleAttribute; +} diff --git a/api/@internal/component/ets/column_split.d.ts b/api/@internal/component/ets/column_split.d.ts index f76e6cc09da387856ea2096a1079ca28614b94c2..8d9616495a761f806582d8efccceceb786ba971d 100644 --- a/api/@internal/component/ets/column_split.d.ts +++ b/api/@internal/component/ets/column_split.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Dimension } from './units'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the ColumnSplit component. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColumnSplitInterface { /** @@ -65,7 +71,8 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): ColumnSplitAttribute; } @@ -85,7 +92,8 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColumnSplitDividerStyle { /** @@ -105,7 +113,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Dimension; @@ -126,7 +135,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Dimension; } @@ -153,7 +163,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColumnSplitAttribute extends CommonMethod { /** @@ -181,12 +192,13 @@ declare class ColumnSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resizeable(value: boolean): ColumnSplitAttribute; /** - * Called when the ColumnSplit split line style is set. + * Set margin of the split line. * @param { ColumnSplitDividerStyle | null } value - indicates the style of the indicator. * if value is set to null, the value of startMargin and endMargin is set to 0.0 by default. * @returns { ColumnSplitAttribute } the attribute of the ColumnSplit @@ -195,14 +207,15 @@ declare class ColumnSplitAttribute extends CommonMethod { * @since 10 */ /** - * Called when the ColumnSplit split line style is set. + * Set margin of the split line. * @param { ColumnSplitDividerStyle | null } value - indicates the style of the indicator. * if value is set to null, the value of startMargin and endMargin is set to 0.0 by default. * @returns { ColumnSplitAttribute } the attribute of the ColumnSplit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: ColumnSplitDividerStyle | null): ColumnSplitAttribute; } diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 97741bdba17eb8db24997bb58dae041a65f41ec0..ebfd56c0c4ee1705ba31272149094e8bdbd40fcc 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -18,6 +18,78 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import OriginalContext from '../../application/Context'; +import { Resource } from '../../global/resource'; +import pointer from '../../@ohos.multimodalInput.pointer'; +import image from '../../@ohos.multimedia.image'; +import unifiedDataChannel from '../../@ohos.data.unifiedDataChannel'; +import promptAction from '../../@ohos.promptAction'; +import uniformTypeDescriptor from '../../@ohos.data.uniformTypeDescriptor'; +import Want from '../../@ohos.app.ability.Want'; +import { IntentionCode } from '../../@ohos.multimodalInput.intentionCode'; +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; +import { CircleShape, EllipseShape, PathShape, RectShape } from '../../@ohos.arkui.shape'; +import uiObserver from '../../@ohos.arkui.observer'; +import { UIContext } from '../../@ohos.arkui.UIContext'; +import { DrawContext, LengthMetrics } from '../../arkui/Graphics'; +import uiEffect from '../../@ohos.graphics.uiEffect'; +import { FocusBoxStyle, FocusPriority } from './focus'; +import { ComponentContent } from '../../arkui/ComponentContent'; +import { ResizableOptions } from './image'; +import { Theme } from '../../@ohos.arkui.theme'; +import intl from '../../@ohos.intl'; +import { ButtonType, ButtonStyleMode, ButtonRole } from './button'; +import { + Area, ResourceColor, Dimension, ResourceStr, Font, Length, EdgeColors, + LocalizedEdgeColors, BorderRadiuses, EdgeWidths, LocalizedEdgeWidths, SizeOptions, Bias, + EdgeStyles, Position, LocalizedBorderRadiuses, Margin, ChainWeightOptions, Padding, LocalizedPadding, LocalizedMargin, + BorderOptions, OutlineOptions, EdgeOutlineStyles, EdgeOutlineWidths, OutlineRadiuses, Edges, LocalizedEdges, LocalizedPosition, + AccessibilityOptions, ConstraintSizeOptions, EdgeWidth, DirectionalEdgesT, VoidCallback + } from './units'; +import { BaseGestureEvent, GestureRecognizer, GestureJudgeResult, GestureType, + GestureMask, GestureHandler, GesturePriority, GestureInfo + } from './gesture'; +import { ScrollState } from './list'; +import { + AccessibilityHoverType, Curve, PlayMode, SharedTransitionEffectType, KeySource, BorderStyle, + HorizontalAlign, VerticalAlign, MouseButton, MouseAction, TransitionType, FontWeight, TouchType, + FontStyle, Color, ColoringStrategy, Placement, ArrowPointPosition, ClickEffectLevel, NestedScrollMode, HitTestMode, + Alignment, ImageRepeat, ImageSize, HoverEffect, Visibility, ItemAlign, Direction, Axis, GradientDirection, FunctionKey, + ModifierKey, ObscuredReasons, RenderFit, LineCapStyle, LineJoinStyle, PixelRoundCalcPolicy, IlluminatedType, TextDecorationType, + TextDecorationStyle, KeyType, ResponseType, BarState, EdgeEffect, ScrollSource, InteractionHand, AxisAction, AxisModel, CrownAction, + FocusDrawLevel, CrownSensitivity +} from './enums'; +import { TextRange } from './textCommon'; +import { StyledString } from './styledString'; +import { CircleAttribute } from './circle'; +import { RectAttribute } from './rect'; +import { PathAttribute } from './path'; +import { EllipseAttribute } from './ellipse'; +import { LocalStorage } from '../stateManagement/storages/localStorage'; +import { CustomBuilder } from './builder'; +/*** endif */ + +/** + * The type for SpringLoadingContext, see the detailed description in dragController. + * + * @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext; + +/** + * The type for DragSpringLoadingConfiguration, see the detailed description in dragController. + * + * @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ +declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; + /** * Defines the options of Component ClassDecorator. * @@ -77,11 +149,12 @@ declare interface ComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InputCounterOptions { /** - * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -89,7 +162,7 @@ declare interface InputCounterOptions { * @since 11 */ /** - * It is the numerator bit of the percentage and used as a threshold. If the number of characters input + * It is the numerator bit of the percentage and used as a threshold. If the number of characters input * reaches the maximum number of characters multiplied by this threshold, the counter is displayed. * *

NOTE: @@ -110,10 +183,11 @@ declare interface InputCounterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ thresholdPercentage?: number; - + /** * If the current input character count reaches the maximum character count and users want to exceed the * normal input, the border will turn red. If this parameter is true, the red border displayed. @@ -141,7 +215,8 @@ declare interface InputCounterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ highlightBorder?: boolean; } @@ -153,7 +228,8 @@ declare interface InputCounterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextDecorationOptions { /** @@ -163,7 +239,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: TextDecorationType; @@ -174,7 +251,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -185,7 +263,8 @@ declare interface TextDecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: TextDecorationStyle; } @@ -298,11 +377,71 @@ declare interface EntryOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useSharedStorage? : boolean, } +/** + * Provides an interface for the style of an divider including stroke width, color, start margin + * and end margin + * + * @interface DividerStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface DividerStyle { + /** + * Define the stroke width of the divider + * + * @type { Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeWidth: Length; + + /** + * Define the color of the divider + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ResourceColor; + + /** + * Define the start margin of the divider + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startMargin?: Length; + + /** + * Define the end margin of the divider + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + endMargin?: Length; +} + /** * Defines Entry ClassDecorator. * @@ -1104,7 +1243,8 @@ declare interface IMonitorValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AnimatableArithmetic { /** @@ -1124,7 +1264,8 @@ declare interface IMonitorValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ plus(rhs: AnimatableArithmetic): AnimatableArithmetic; @@ -1145,7 +1286,8 @@ declare interface IMonitorValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ subtract(rhs: AnimatableArithmetic): AnimatableArithmetic; @@ -1166,7 +1308,8 @@ declare interface IMonitorValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiply(scale: number): AnimatableArithmetic; @@ -1187,7 +1330,8 @@ declare interface IMonitorValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ equals(rhs: AnimatableArithmetic): boolean; } @@ -1222,7 +1366,7 @@ declare const Concurrent: MethodDecorator; * A function with this decorator is marked as sendable, and the function can be an shareable property of sendable-class object. * A typeAlias with this decorator is marked as sendable, and the typeAlias can be used to declare properties, variables, * and arguments that need to be assigned with sendable-function. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1392,7 +1536,8 @@ declare const ReusableV2: ClassDecorator; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ReuseIdCallback = () => string; @@ -1403,7 +1548,8 @@ declare const ReusableV2: ClassDecorator; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ReuseOptions { /** @@ -1413,7 +1559,8 @@ declare interface ReuseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ reuseId? : ReuseIdCallback; } @@ -1446,6 +1593,19 @@ declare interface ReuseOptions { */ declare type Context = import('../api/application/Context').default; +/** + * Export Context. + * + * @typedef { OriginalContext } Context + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @stagemodelonly + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type Context = OriginalContext; + /** * Post Card Action. * @@ -1477,7 +1637,8 @@ declare type Context = import('../api/application/Context').default; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare function postCardAction(component: Object, action: Object): void; @@ -1513,7 +1674,8 @@ declare function postCardAction(component: Object, action: Object): void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Configuration { /** @@ -1552,7 +1714,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly colorMode: string; @@ -1592,7 +1755,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontScale: number; } @@ -1629,7 +1793,8 @@ declare interface Configuration { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Rectangle { /** @@ -1664,7 +1829,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length; @@ -1700,7 +1866,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length; @@ -1736,7 +1903,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length; @@ -1772,7 +1940,8 @@ declare interface Rectangle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Length; } @@ -1799,7 +1968,8 @@ declare interface Rectangle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ExpectedFrameRateRange { /** @@ -1824,7 +1994,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ min: number, /** @@ -1849,7 +2020,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ max: number, /** @@ -1880,7 +2052,8 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ expected: number, } @@ -1949,6 +2122,21 @@ declare interface ExpectedFrameRateRange { */ declare function $r(value: string, ...params: any[]): Resource; +/** + * global $r function + * + * @param { string } value + * @param { (Object | null | undefined)[] } params + * @returns { Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare function $r(value: string, ...params: (Object | null | undefined)[]): Resource; + /** * global $rawfile function * @@ -2001,7 +2189,8 @@ declare function $r(value: string, ...params: any[]): Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare function $rawfile(value: string): Resource; /** @@ -2011,7 +2200,8 @@ declare function $rawfile(value: string): Resource; * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilitySamePageMode { /** @@ -2021,7 +2211,8 @@ declare enum AccessibilitySamePageMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEMI_SILENT = 0, /** @@ -2030,7 +2221,8 @@ declare enum AccessibilitySamePageMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_SILENT = 1, } @@ -2041,7 +2233,8 @@ declare enum AccessibilitySamePageMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilityRoleType { /** @@ -2050,7 +2243,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_SHEET = 0, /** @@ -2059,7 +2253,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ALERT_DIALOG = 1, /** @@ -2068,7 +2263,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ INDEXER_COMPONENT = 2, /** @@ -2077,7 +2273,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BADGE_COMPONENT = 3, /** @@ -2086,7 +2283,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BLANK = 4, /** @@ -2095,7 +2293,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BUTTON = 5, /** @@ -2104,7 +2303,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BACK_BUTTON = 6, /** @@ -2113,7 +2313,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SHEET_DRAG_BAR = 7, /** @@ -2122,7 +2323,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CALENDAR_PICKER = 8, /** @@ -2131,7 +2333,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CALENDAR = 9, /** @@ -2140,7 +2343,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS = 10, /** @@ -2149,7 +2353,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_GRADIENT = 11, /** @@ -2158,7 +2363,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_PATTERN = 12, /** @@ -2167,7 +2373,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHECKBOX = 13, /** @@ -2176,7 +2383,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHECKBOX_GROUP = 14, /** @@ -2185,7 +2393,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 15, /** @@ -2194,7 +2403,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COLUMN_SPLIT = 16, /** @@ -2203,7 +2413,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COLUMN = 17, /** @@ -2212,7 +2423,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANVAS_RENDERING_CONTEXT_2D = 18, /** @@ -2221,7 +2433,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CHART = 19, /** @@ -2230,7 +2443,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTER = 20, /** @@ -2239,7 +2453,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CONTAINER_MODAL = 21, /** @@ -2248,7 +2463,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DATA_PANEL = 22, /** @@ -2257,7 +2473,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_PICKER = 23, /** @@ -2266,7 +2483,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 24, /** @@ -2275,7 +2493,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIVIDER = 25, /** @@ -2284,7 +2503,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_BAR = 26, /** @@ -2293,7 +2513,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_COMPONENT = 27, /** @@ -2302,7 +2523,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ELLIPSE = 28, /** @@ -2311,7 +2533,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLEX = 29, /** @@ -2320,7 +2543,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FLOW_ITEM = 30, /** @@ -2329,7 +2553,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FORM_COMPONENT = 31, /** @@ -2338,7 +2563,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FORM_LINK = 32, /** @@ -2347,7 +2573,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GAUGE = 33, /** @@ -2356,7 +2583,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID = 34, /** @@ -2365,7 +2593,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_COL = 35, /** @@ -2374,7 +2603,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_CONTAINER = 36, /** @@ -2383,7 +2613,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_ITEM = 37, /** @@ -2392,7 +2623,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ GRID_ROW = 38, /** @@ -2401,7 +2633,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HYPERLINK = 39, /** @@ -2410,7 +2643,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 40, /** @@ -2419,7 +2653,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_ANIMATOR = 41, /** @@ -2428,7 +2663,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_BITMAP = 42, /** @@ -2437,7 +2673,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_DATA = 43, /** @@ -2446,7 +2683,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_SPAN = 44, /** @@ -2455,7 +2693,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LABEL = 45, /** @@ -2464,7 +2703,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LINE = 46, /** @@ -2473,7 +2713,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST = 47, /** @@ -2482,7 +2723,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST_ITEM = 48, /** @@ -2491,7 +2733,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LIST_ITEM_GROUP = 49, /** @@ -2500,7 +2743,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_PROGRESS = 50, /** @@ -2509,7 +2753,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MARQUEE = 51, /** @@ -2518,7 +2763,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MATRIX2D = 52, /** @@ -2527,7 +2773,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU = 53, /** @@ -2536,7 +2783,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU_ITEM = 54, /** @@ -2545,7 +2793,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MENU_ITEM_GROUP = 55, /** @@ -2554,7 +2803,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAV_DESTINATION = 56, /** @@ -2563,7 +2813,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAV_ROUTER = 57, /** @@ -2572,7 +2823,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION = 58, /** @@ -2581,7 +2833,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_BAR = 59, /** @@ -2590,7 +2843,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_MENU = 60, /** @@ -2599,7 +2853,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATOR = 61, /** @@ -2608,7 +2863,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN_CANVAS = 62, /** @@ -2617,7 +2873,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN_CANVAS_RENDERING_CONTEXT2D = 63, /** @@ -2626,7 +2883,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OPTION = 64, /** @@ -2635,7 +2893,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PANEL = 65, /** @@ -2644,7 +2903,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PAPER_PAGE = 66, /** @@ -2653,7 +2913,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATH = 67, /** @@ -2662,7 +2923,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATH2D = 68, /** @@ -2671,7 +2933,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PATTERN_LOCK = 69, /** @@ -2680,7 +2943,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PICKER = 70, /** @@ -2689,7 +2953,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PICKER_VIEW = 71, /** @@ -2698,7 +2963,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PLUGIN_COMPONENT = 72, /** @@ -2707,7 +2973,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POLYGON = 73, /** @@ -2716,7 +2983,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POLYLINE = 74, /** @@ -2725,7 +2993,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ POPUP = 75, /** @@ -2734,7 +3003,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PROGRESS = 76, /** @@ -2743,7 +3013,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ QRCODE = 77, /** @@ -2752,7 +3023,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RADIO = 78, /** @@ -2761,7 +3033,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RATING = 79, /** @@ -2770,7 +3043,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 80, /** @@ -2779,7 +3053,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ REFRESH = 81, /** @@ -2788,7 +3063,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RELATIVE_CONTAINER = 82, /** @@ -2797,7 +3073,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ REMOTE_WINDOW = 83, /** @@ -2806,7 +3083,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RICH_EDITOR = 84, /** @@ -2815,7 +3093,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RICH_TEXT = 85, /** @@ -2824,7 +3103,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROLE_PAGER = 86, /** @@ -2833,7 +3113,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROW = 87, /** @@ -2842,7 +3123,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROW_SPLIT = 88, /** @@ -2851,7 +3133,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL = 89, /** @@ -2860,7 +3143,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR = 90, /** @@ -2869,7 +3153,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEARCH = 91, /** @@ -2878,7 +3163,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEARCH_FIELD = 92, /** @@ -2887,7 +3173,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 93, /** @@ -2896,7 +3183,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SHAPE = 94, /** @@ -2905,7 +3193,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SIDEBAR_CONTAINER = 95, /** @@ -2914,7 +3203,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDER = 96, /** @@ -2923,7 +3213,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SPAN = 97, /** @@ -2932,7 +3223,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STACK = 98, /** @@ -2941,7 +3233,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STEPPER = 99, /** @@ -2950,7 +3243,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STEPPER_ITEM = 100, /** @@ -2959,7 +3253,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPER = 101, /** @@ -2968,7 +3263,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPER_INDICATOR = 102, /** @@ -2977,7 +3273,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SWITCH = 103, /** @@ -2986,7 +3283,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SYMBOL_GLYPH = 104, /** @@ -2995,7 +3293,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TAB_CONTENT = 105, /** @@ -3004,7 +3303,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TAB_BAR = 106, /** @@ -3013,7 +3313,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TABS = 107, /** @@ -3022,7 +3323,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 108, /** @@ -3031,7 +3333,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_CLOCK = 109, /** @@ -3040,7 +3343,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_ENTRY = 110, /** @@ -3049,7 +3353,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_INPUT = 111, /** @@ -3058,7 +3363,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_PICKER = 112, /** @@ -3067,7 +3373,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_TIMER = 113, /** @@ -3076,7 +3383,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_AREA = 114, /** @@ -3085,7 +3393,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_FIELD = 115, /** @@ -3094,7 +3403,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TIME_PICKER = 116, /** @@ -3103,7 +3413,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TITLE_BAR = 117, /** @@ -3112,7 +3423,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOGGLER = 118, /** @@ -3121,7 +3433,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ UI_EXTENSION_COMPONENT = 119, /** @@ -3130,7 +3443,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO = 120, /** @@ -3139,7 +3453,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WATER_FLOW = 121, /** @@ -3148,7 +3463,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WEB = 122, /** @@ -3157,7 +3473,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ XCOMPONENT = 123, /** @@ -3166,7 +3483,8 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ROLE_NONE = 124, } @@ -3179,101 +3497,19 @@ declare enum AccessibilityRoleType { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type AccessibilityFocusCallback = (isFocus: boolean) => void; /** - * Enum for accessibility action type + * Enum for FinishCallbackType. + * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice - * @since 20 - */ -declare enum AccessibilityAction { - /** - * undefined action type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - UNDEFINED_ACTION = 0, - /** - * accessibility click action - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - ACCESSIBILITY_CLICK = 1, -} - -/** - * Enum for the result of accessibility action intercept function - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -declare enum AccessibilityActionInterceptResult { - /** - * intercept the accessibility action - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - ACTION_INTERCEPT = 0, - /** - * the accessibility action can be continued - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - ACTION_CONTINUE = 1, - /** - * the accessibility action need to bubble up for execution - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - ACTION_RISE = 2, -} - -/** - * Defines the callback type used in accessibility action intercept. - * The value of action indicates the accessibility action type. - * @typedef { function } AccessibilityActionInterceptCallback - * @param { AccessibilityAction } action - the enum of accessibility action type. - * @returns { AccessibilityActionInterceptResult } the result of continuing to execute the action or interrupting it or bubbling up - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction) => AccessibilityActionInterceptResult; - -/** - * Enum for FinishCallbackType. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 + * @since 11 */ /** * Enum for FinishCallbackType. @@ -3283,7 +3519,8 @@ declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FinishCallbackType { /** @@ -3301,7 +3538,8 @@ declare enum FinishCallbackType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REMOVED = 0, /** @@ -3320,7 +3558,8 @@ declare enum FinishCallbackType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOGICALLY = 1, } @@ -3342,7 +3581,8 @@ declare enum FinishCallbackType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TouchTestStrategy { /** @@ -3360,7 +3600,8 @@ declare enum TouchTestStrategy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -3380,7 +3621,8 @@ declare enum TouchTestStrategy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD_COMPETITION = 1, @@ -3400,7 +3642,8 @@ declare enum TouchTestStrategy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD = 2 } @@ -3437,7 +3680,8 @@ declare enum TouchTestStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AnimateParam { /** @@ -3476,7 +3720,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -3509,7 +3754,8 @@ declare interface AnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tempo?: number; /** @@ -3548,7 +3794,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; @@ -3577,7 +3824,8 @@ declare interface AnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -3612,7 +3860,8 @@ declare interface AnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; @@ -3652,7 +3901,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ playMode?: PlayMode; @@ -3688,7 +3938,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: () => void; @@ -3710,7 +3961,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishCallbackType?: FinishCallbackType; @@ -3727,7 +3979,8 @@ declare interface AnimateParam { * @type { ?ExpectedFrameRateRange } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ expectedFrameRateRange?: ExpectedFrameRateRange; } @@ -3757,7 +4010,8 @@ declare interface AnimateParam { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ICurve { /** @@ -3797,7 +4051,8 @@ interface ICurve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interpolate(fraction: number): number; } @@ -3824,7 +4079,8 @@ interface ICurve { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionPathOptions { /** @@ -3861,7 +4117,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ path: string; @@ -3896,7 +4153,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ from?: number; @@ -3934,7 +4192,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ to?: number; @@ -3963,7 +4222,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotatable?: boolean; } @@ -3990,7 +4250,8 @@ declare interface MotionPathOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface sharedTransitionOptions { /** @@ -4024,7 +4285,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; @@ -4032,7 +4294,6 @@ declare interface sharedTransitionOptions { * Animation curve.
You are advised to specify the curve using the Curve or ICurve type. * * @type { ?(Curve | string | ICurve) } - * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -4044,7 +4305,6 @@ declare interface sharedTransitionOptions { *
Default value: **Curve.Linear**. * * @type { ?(Curve | string | ICurve) } - * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -4057,11 +4317,11 @@ declare interface sharedTransitionOptions { *
Default value: **Curve.Linear**. * * @type { ?(Curve | string | ICurve) } - * @default 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; @@ -4090,7 +4350,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -4116,7 +4377,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ motionPath?: MotionPathOptions; @@ -4142,7 +4404,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ zIndex?: number; @@ -4171,7 +4434,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: SharedTransitionEffectType; } @@ -4191,7 +4455,8 @@ declare interface sharedTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GeometryTransitionOptions { /** @@ -4211,12 +4476,13 @@ declare interface GeometryTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ follow?: boolean; /** * Defines movement strategy of source and target in the hierarchy during geometry transition. - * + * * @type { ?TransitionHierarchyStrategy } * @default TransitionHierarchyStrategy.ADAPTIVE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4226,12 +4492,13 @@ declare interface GeometryTransitionOptions { */ /** * Defines movement strategy of source and target in the hierarchy during geometry transition. - * + * * @type { ?TransitionHierarchyStrategy } * @default TransitionHierarchyStrategy.ADAPTIVE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hierarchyStrategy?: TransitionHierarchyStrategy } @@ -4244,7 +4511,8 @@ declare interface GeometryTransitionOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearGradientOptions { /** @@ -4301,7 +4569,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angle?: number | string; @@ -4359,7 +4628,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: GradientDirection; @@ -4416,7 +4686,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; @@ -4474,7 +4745,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -4487,7 +4759,8 @@ declare interface LinearGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SweepGradientOptions { /** @@ -4543,7 +4816,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ center: [Length, Length]; @@ -4602,7 +4876,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number | string; @@ -4659,7 +4934,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number | string; @@ -4717,7 +4993,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ rotation?: number | string; @@ -4774,7 +5051,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; @@ -4844,7 +5122,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -4857,7 +5136,8 @@ declare interface SweepGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadialGradientOptions { /** @@ -4913,7 +5193,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ center: [Length, Length]; @@ -4970,7 +5251,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radius: Length; @@ -5027,7 +5309,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Array<[ResourceColor, number]>; @@ -5085,7 +5368,8 @@ declare interface RadialGradientOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeating?: boolean; } @@ -5111,7 +5395,8 @@ declare interface RadialGradientOptions { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionHierarchyStrategy { /** @@ -5129,7 +5414,8 @@ declare enum TransitionHierarchyStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -5150,7 +5436,8 @@ declare enum TransitionHierarchyStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ADAPTIVE = 1, } @@ -5187,7 +5474,8 @@ declare enum TransitionHierarchyStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TranslateOptions { /** @@ -5230,7 +5518,8 @@ declare interface TranslateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number | string; @@ -5274,7 +5563,8 @@ declare interface TranslateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number | string; @@ -5314,7 +5604,8 @@ declare interface TranslateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number | string; } @@ -5351,7 +5642,8 @@ declare interface TranslateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScaleOptions { /** @@ -5398,7 +5690,8 @@ declare interface ScaleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -5446,7 +5739,8 @@ declare interface ScaleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -5490,7 +5784,8 @@ declare interface ScaleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number; @@ -5526,7 +5821,8 @@ declare interface ScaleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerX?: number | string; @@ -5562,7 +5858,8 @@ declare interface ScaleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerY?: number | string; } @@ -5570,125 +5867,268 @@ declare interface ScaleOptions { /** * Defines the align rule options of relative container. * - * @interface AlignRuleOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the align rule options of relative container. - * - * @interface AlignRuleOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the align rule options of relative container. - * - * @interface AlignRuleOption + * @interface AlignRuleParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ -declare interface AlignRuleOption { +declare interface AlignRuleParam { /** - * The param of left align. + * The param of anchor. * - * @type { ?object } + * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form - * @since 9 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + anchor: string; /** - * The param of left align. + * The param of align. * - * @type { ?object } + * @type { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @since 10 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + align: T +} + +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AlignRuleOption { /** - * Left alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of left align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - left?: { anchor: string, align: HorizontalAlign }; + left?:AlignRuleParam; /** * The param of right align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form - * @since 9 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + right?: AlignRuleParam; + /** - * The param of right align. + * The param of middle align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @since 10 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + middle?: AlignRuleParam; + /** - * Right alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of top align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - right?: { anchor: string, align: HorizontalAlign }; + top?: AlignRuleParam; /** - * The param of middle align. + * The param of bottom align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form - * @since 9 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + bottom?: AlignRuleParam; + /** - * The param of middle align. + * The param of center align. * - * @type { ?object } + * @type { ?AlignRuleParam } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @since 10 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + center?: AlignRuleParam; + /** - * Horizontal center alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * Defines the bias ratio in horizontal and vertical direction. * - * @type { ?object } + * @type { ?Bias } + * @default {horizontal:0.5,vertical:0.5} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ - middle?: { anchor: string, align: HorizontalAlign }; + bias?: Bias; +} - /** + +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ +/** + * Defines the align rule options of relative container. + * + * @interface AlignRuleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ +declare interface AlignRuleOption { + /** + * The param of left align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The param of left align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Left alignment. + *
anchor: ID of the component that functions as the anchor point. + *
align: alignment mode relative to the anchor component. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + left?: { anchor: string, align: HorizontalAlign }; + + /** + * The param of right align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The param of right align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Right alignment. + *
anchor: ID of the component that functions as the anchor point. + *
align: alignment mode relative to the anchor component. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + right?: { anchor: string, align: HorizontalAlign }; + + /** + * The param of middle align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The param of middle align. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal center alignment. + *
anchor: ID of the component that functions as the anchor point. + *
align: alignment mode relative to the anchor component. + * + * @type { ?object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + middle?: { anchor: string, align: HorizontalAlign }; + + /** * The param of top align. * * @type { ?object } @@ -5811,7 +6251,8 @@ declare interface AlignRuleOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedHorizontalAlignParam { /** @@ -5821,8 +6262,9 @@ declare interface LocalizedHorizontalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ anchor: string; /** @@ -5832,8 +6274,9 @@ declare interface LocalizedHorizontalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ align: HorizontalAlign; } @@ -5844,7 +6287,8 @@ declare interface LocalizedHorizontalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedVerticalAlignParam { /** @@ -5854,8 +6298,9 @@ declare interface LocalizedVerticalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ anchor: string; /** @@ -5865,8 +6310,9 @@ declare interface LocalizedVerticalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ align: VerticalAlign; } @@ -5877,7 +6323,8 @@ declare interface LocalizedVerticalAlignParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedAlignRuleOptions { /** @@ -5887,7 +6334,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LocalizedHorizontalAlignParam; @@ -5898,7 +6346,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LocalizedHorizontalAlignParam; @@ -5909,7 +6358,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ middle?: LocalizedHorizontalAlignParam; @@ -5920,7 +6370,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LocalizedVerticalAlignParam; @@ -5931,7 +6382,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LocalizedVerticalAlignParam; @@ -5942,7 +6394,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ center?: LocalizedVerticalAlignParam; @@ -5955,7 +6408,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bias?: Bias; } @@ -5967,7 +6421,8 @@ declare interface LocalizedAlignRuleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ChainStyle { /** @@ -5976,7 +6431,8 @@ declare enum ChainStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPREAD, @@ -5986,7 +6442,8 @@ declare enum ChainStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPREAD_INSIDE, @@ -5996,7 +6453,8 @@ declare enum ChainStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PACKED, } @@ -6033,7 +6491,8 @@ declare enum ChainStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RotateOptions { /** @@ -6068,7 +6527,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -6104,7 +6564,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -6140,7 +6601,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number; @@ -6176,7 +6638,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerX?: number | string; @@ -6211,7 +6674,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerY?: number | string; @@ -6234,7 +6698,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerZ?: number; @@ -6261,7 +6726,8 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ perspective?: number; @@ -6297,13 +6763,14 @@ declare interface RotateOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number | string; } /** - * The param of rotate about angle. + * The rotation parameters containing multi-axis angle information. * * @interface RotateAngleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6501,7 +6968,8 @@ declare interface TransitionOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionEdge { /** @@ -6519,7 +6987,8 @@ declare enum TransitionEdge { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -6538,7 +7007,8 @@ declare enum TransitionEdge { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, @@ -6559,7 +7029,8 @@ declare enum TransitionEdge { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -6580,7 +7051,8 @@ declare enum TransitionEdge { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } @@ -6618,14 +7090,54 @@ declare type TransitionEffects = { }; }; +/** + * Defines the option of asymmetric transition. + * + * @interface AsymmetricTransitionOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AsymmetricTransitionOption { + /** + * TransitionEffect used for appearing + * + * @type { TransitionEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + appear: TransitionEffect; + + /** + * TransitionEffect used for disappearing + * + * @type { TransitionEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + disappear: TransitionEffect; +} + /** * Defined the draw modifier of node. Provides draw callbacks for the associated Node. * Each DrawModifier instance can be set for only one component. Repeated setting is not allowed. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DrawModifier { /** @@ -6640,7 +7152,19 @@ declare class DrawModifier { drawBehind?(drawContext: DrawContext): void; /** - * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced + * drawBehind Method. Executed before drawing associated Node. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + drawBehind(drawContext: DrawContext): void; + + /** + * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced * if this method is set. * * @param { DrawContext } drawContext - The drawContext used to draw. @@ -6650,7 +7174,21 @@ declare class DrawModifier { * @since 12 */ drawContent?(drawContext: DrawContext): void; - + + /** + * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced + * if this method is set. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + drawContent(drawContext: DrawContext): void; + + /** * drawFront Method. Executed after drawing associated Node. * @@ -6663,15 +7201,31 @@ declare class DrawModifier { drawFront?(drawContext: DrawContext): void; /** - * drawforeground Method. Executed after drawing associated Node and its children. + * drawforeground Method. This method is executed after drawing associated Node and its children. + * It allows you to perform additional drawing operations on top of the already rendered content. + * This can be useful for adding visual elements that should appear above the main content. + * * @param { DrawContext } drawContext - The drawContext used to draw * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - drawForeground?(drawContext: DrawContext): void; - + drawForeground(drawContext: DrawContext): void; + /** + * drawforeground Method. This method is executed after drawing associated Node and its children. + * It allows you to perform additional drawing operations on top of the already rendered content. + * This can be useful for adding visual elements that should appear above the main content. + * + * @param { DrawContext } drawContext - The drawContext used to draw. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + drawFront(drawContext: DrawContext): void; + /** * Invalidate the component, which will cause a re-render of the component. * No overloading is allowed or needed. @@ -6679,7 +7233,8 @@ declare class DrawModifier { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; } @@ -6815,7 +7370,7 @@ declare class TransitionEffect< * This transition effect comes with its own animation parameters, which can also be overridden. * The default animation duration is 600 milliseconds, * with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8. - * + * * @type { TransitionEffect<"slideSwitch"> } * @readonly * @static @@ -6831,7 +7386,7 @@ declare class TransitionEffect< * This transition effect comes with its own animation parameters, which can also be overridden. * The default animation duration is 600 milliseconds, * with a specified animation curve of cubicBezierCurve(0.24, 0.0, 0.50, 1.0) and a minimum scale factor of 0.8. - * + * * @type { TransitionEffect<"slideSwitch"> } * @readonly * @static @@ -7105,34 +7660,338 @@ declare class TransitionEffect< } /** - * Define Preview property - * - * @interface PreviewParams - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Define Preview property + * Defines the transition effect * - * @interface PreviewParams * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ -interface PreviewParams { +declare class TransitionEffect { + /** - * Define Preview title + * Disables the transition effect * - * @type { ?string } + * @type { TransitionEffect } + * @readonly + * @static * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form - * @since 9 + * @atomicservice + * @since 20 + * @arkts 1.2 */ + static readonly IDENTITY: TransitionEffect; + /** - * Define Preview title + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly OPACITY: TransitionEffect; + + /** + * Defines a slide transition effect + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly SLIDE: TransitionEffect; + + /** + * Specify a transition effect where the element enters by shrinking first and then expanding as it slides in from the right, + * and exits by shrinking first and then expanding as it slides out to the left, with a minimum scale ratio of 0.8. + * It comes with default animation parameters, which can also be overridden. + * The default animation duration is set to 600ms, and the specified animation curve is cubicBezierCurve(0.24, 0.0, 0.50, 1.0). + * + * @type { TransitionEffect } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static readonly SLIDE_SWITCH: TransitionEffect; + + /** + * Creates a translate transition effect + * + * @param { TranslateOptions } options - translate options + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static translate(options: TranslateOptions): TransitionEffect; + + /** + * Creates a rotation transition effect + * + * @param { RotateOptions } options - rotate options + * Set the rotation effect for component transitions when inserting and deleting. + * The value represents the starting rotation point for the inserting animation and the ending rotation point for the deleting animation. + * -x: Horizontal component of the rotational vector. + * -y: Vertical component of the rotational vector. + * -z: Vertical component of the rotational vector. + * -centerX, centerY specify the rotation center point, with default values of "50%", + * meaning that the default rotation center point is the center point of the component. + * -The center point of (0, 0) represents the upper-left corner of the component. + * -centerZ refers to the Z-axis anchor point. The default value of centerZ is 0. + * -perspective indicates the visual distance. The perspective property does not support transition animation. + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static rotate(options: RotateOptions): TransitionEffect; + + /** + * Creates a scale transition effect + * + * @param { ScaleOptions } options - scale options + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static scale(options: ScaleOptions): TransitionEffect; + + /** + * Creates an opacity transition effect with alpha value + * + * @param { number } alpha - opacity alpha value, value range [0, 1]. + * Illegal values less than 0 are treated as 0, and illegal values greater than 1 are treated as 1. + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static opacity(alpha: number): TransitionEffect; + + /** + * Creates a move transition effect + * + * @param { TransitionEdge } edge - the edge that component will move to + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static move(edge: TransitionEdge): TransitionEffect; + + /** + * Creates an asymmetric transition effect + * + * @param { TransitionEffect } appear - the transition which will be attached when the component is appear + * @param { TransitionEffect } disappear - the transition which will be attached when the component is disappear + * @returns { TransitionEffect } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static asymmetric(appear: TransitionEffect, disappear: TransitionEffect): TransitionEffect; + + /** + * identity or slideSwitch TransitionEffect constructor + * + * @param { 'identity' | 'slideSwitch' } type - transition type + * @param { undefined } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'identity' | 'slideSwitch', effect: undefined); + + /** + * opacity TransitionEffect constructor + * + * @param { 'opacity' } type - transition type + * @param { number } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'opacity', effect: number); + + /** + * move TransitionEffect constructor + * + * @param { 'move' } type - transition type + * @param { TransitionEdge } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'move', effect: TransitionEdge); + + /** + * translate TransitionEffect constructor + * + * @param { 'translate' } type - transition type + * @param { TranslateOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'translate', effect:TranslateOptions); + + /** + * rotate TransitionEffect constructor + * + * @param { 'rotate' } type - transition type + * @param { RotateOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'rotate', effect: RotateOptions); + + /** + * scale TransitionEffect constructor + * + * @param { 'scale' } type - transition type + * @param { ScaleOptions } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'scale', effect: ScaleOptions); + + /** + * asymmetric TransitionEffect constructor + * + * @param { 'asymmetric' } type - transition type + * @param { AsymmetricTransitionOption } effect - transition options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(type: 'asymmetric', effect: AsymmetricTransitionOption); + + /** + * Set the animation of current transition effect + * + * @param { AnimateParam } value - animation parameters + * @returns { TransitionEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + animation(value: AnimateParam): TransitionEffect; + + /** + * Combines another transition effect + * + * @param { TransitionEffect } transitionEffect - transition effect which is be combined + * @returns { TransitionEffect } combined transition effect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + combine(transitionEffect: TransitionEffect): TransitionEffect; +} + +/** + * Define Preview property + * + * @interface PreviewParams + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ +/** + * Define Preview property + * + * @interface PreviewParams + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ +interface PreviewParams { + /** + * Define Preview title + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Define Preview title * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -7321,7 +8180,8 @@ interface PreviewParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ItemDragInfo { /** @@ -7346,7 +8206,8 @@ declare interface ItemDragInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -7372,7 +8233,8 @@ declare interface ItemDragInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } @@ -7383,7 +8245,8 @@ declare interface ItemDragInfo { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectType { /** @@ -7391,7 +8254,8 @@ declare enum EffectType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** @@ -7399,7 +8263,8 @@ declare enum EffectType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ WINDOW_EFFECT = 1, } @@ -7410,7 +8275,8 @@ declare enum EffectType { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PreDragStatus { /** @@ -7418,7 +8284,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_DETECTING_STATUS = 0, @@ -7427,7 +8294,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ READY_TO_TRIGGER_DRAG_ACTION = 1, @@ -7436,7 +8304,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LIFT_STARTED = 2, @@ -7445,7 +8314,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LIFT_FINISHED = 3, @@ -7454,7 +8324,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LANDING_STARTED = 4, @@ -7463,7 +8334,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_LANDING_FINISHED = 5, @@ -7472,7 +8344,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_CANCELED_BEFORE_DRAG = 6, @@ -7481,7 +8354,8 @@ declare enum PreDragStatus { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PREPARING_FOR_DRAG_DETECTION = 7, } @@ -7508,7 +8382,8 @@ declare enum PreDragStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragItemInfo { /** @@ -7533,7 +8408,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts{'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap?: PixelMap; @@ -7559,7 +8435,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -7585,7 +8462,8 @@ declare interface DragItemInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo?: string; } @@ -7626,7 +8504,8 @@ declare interface DragItemInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#animateTo */ @@ -7642,7 +8521,8 @@ declare function animateTo(value: AnimateParam, event: () => void): void; * and the system will automatically insert transition animations for state changes caused by the closure function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare function animateToImmediately(value: AnimateParam, event: () => void): void; @@ -7698,7 +8578,8 @@ declare function animateToImmediately(value: AnimateParam, event: () => void): v * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#vp2px */ @@ -7756,7 +8637,8 @@ declare function vp2px(value: number): number; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#px2vp */ @@ -7979,7 +8861,8 @@ declare function px2lpx(value: number): number; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace focusControl { /** @@ -8007,7 +8890,8 @@ declare namespace focusControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function requestFocus(value: string): boolean; } @@ -8029,6 +8913,17 @@ declare namespace focusControl { */ declare type PointerStyle = import('../api/@ohos.multimodalInput.pointer').default.PointerStyle; +/** + * Import the PointerStyle type object for setCursor. + * + * @typedef { pointer.PointerStyle } PointerStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PointerStyle = pointer.PointerStyle; + /** * CursorControl * @@ -8042,7 +8937,8 @@ declare type PointerStyle = import('../api/@ohos.multimodalInput.pointer').defau * @namespace cursorControl * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cursorControl { @@ -8061,7 +8957,8 @@ declare namespace cursorControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function setCursor(value: PointerStyle): void; @@ -8078,7 +8975,8 @@ declare namespace cursorControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function restoreDefault(): void; } @@ -8115,7 +9013,8 @@ declare namespace cursorControl { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EventTarget { /** @@ -8150,7 +9049,8 @@ declare interface EventTarget { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ area: Area; @@ -8162,7 +9062,8 @@ declare interface EventTarget { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; } @@ -8189,7 +9090,8 @@ declare interface EventTarget { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SourceType { /** @@ -8211,7 +9113,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -8234,7 +9137,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mouse, @@ -8257,7 +9161,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TouchScreen, } @@ -8284,7 +9189,8 @@ declare enum SourceType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SourceTool { /** @@ -8306,7 +9212,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -8329,7 +9236,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Finger, @@ -8352,7 +9260,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pen, @@ -8362,7 +9271,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOUSE, @@ -8372,7 +9282,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD, @@ -8382,7 +9293,8 @@ declare enum SourceTool { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ JOYSTICK, } @@ -8412,7 +9324,8 @@ declare enum SourceTool { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RepeatMode { /** @@ -8437,7 +9350,8 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Repeat, @@ -8463,7 +9377,8 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stretch, @@ -8489,7 +9404,8 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, @@ -8515,7 +9431,8 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Space, } @@ -8545,7 +9462,8 @@ declare enum RepeatMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurStyle { /** @@ -8570,7 +9488,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thin, @@ -8596,7 +9515,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Regular, @@ -8622,7 +9542,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thick, @@ -8640,7 +9561,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_THIN, @@ -8658,7 +9580,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_REGULAR, @@ -8676,7 +9599,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_THICK, @@ -8694,7 +9618,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_ULTRA_THICK, @@ -8713,9 +9638,10 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 11 - */ - NONE, + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + NONE, /** * Component ultra-thin material. @@ -8732,7 +9658,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_ULTRA_THIN = 8, @@ -8751,7 +9678,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_THIN = 9, @@ -8770,7 +9698,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_REGULAR = 10, @@ -8789,7 +9718,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_THICK = 11, @@ -8808,7 +9738,8 @@ declare enum BlurStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENT_ULTRA_THICK = 12, } @@ -8820,7 +9751,8 @@ declare enum BlurStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurStyleActivePolicy { /** @@ -8829,7 +9761,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOWS_WINDOW_ACTIVE_STATE = 0, @@ -8839,7 +9772,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_ACTIVE = 1, @@ -8849,7 +9783,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_INACTIVE = 2, } @@ -8869,7 +9804,8 @@ declare enum BlurStyleActivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ThemeColorMode { /** @@ -8885,7 +9821,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM, @@ -8902,7 +9839,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT, @@ -8919,7 +9857,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DARK, } @@ -8939,7 +9878,8 @@ declare enum ThemeColorMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AdaptiveColor { /** @@ -8957,7 +9897,8 @@ declare enum AdaptiveColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -8974,7 +9915,8 @@ declare enum AdaptiveColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AVERAGE, } @@ -8994,23 +9936,27 @@ declare enum AdaptiveColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModalTransition { /** - * Slide-up and slide-down animation for the modal. + * Use default animation. + * Upward animation when entering and downward animation when exiting. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Slide-up and slide-down animation for the modal. + * Use default animation. + * Upward animation when entering and downward animation when exiting. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -9027,7 +9973,8 @@ declare enum ModalTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE, @@ -9044,7 +9991,8 @@ declare enum ModalTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALPHA, } @@ -9066,7 +10014,8 @@ declare enum ModalTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { /** @@ -9077,7 +10026,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ policy?: BlurStyleActivePolicy; @@ -9089,7 +10039,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ inactiveColor?: ResourceColor; } @@ -9111,7 +10062,8 @@ declare interface BackgroundBlurStyleOptions extends BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ForegroundBlurStyleOptions extends BlurStyleOptions {} @@ -9131,23 +10083,25 @@ declare interface ForegroundBlurStyleOptions extends BlurStyleOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BlurOptions { /** - * Fuzzy gray scale parameter. + * Fuzzy gray scale parameter.The range of values for the two parameters is [0, 127]. * @type { [number, number] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Fuzzy gray scale parameter. + * Fuzzy gray scale parameter.The range of values for the two parameters is [0, 127]. * @type { [number, number] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale: [number, number]; } @@ -9160,18 +10114,20 @@ declare interface BlurOptions { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SystemAdaptiveOptions { /** * Whether to disable system adaptive. - * + * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disableSystemAdaptation?: boolean; } @@ -9191,7 +10147,8 @@ declare interface SystemAdaptiveOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BlurStyleOptions { /** @@ -9212,7 +10169,8 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colorMode?: ThemeColorMode; @@ -9234,7 +10192,8 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ adaptiveColor?: AdaptiveColor; @@ -9247,7 +10206,8 @@ declare interface BlurStyleOptions { * @default 1.0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number; @@ -9268,7 +10228,8 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurOptions?: BlurOptions; } @@ -9288,7 +10249,8 @@ declare interface BlurStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundEffectOptions { @@ -9311,7 +10273,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; @@ -9336,7 +10299,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ saturation?: number; @@ -9361,7 +10325,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ brightness?: number; @@ -9382,7 +10347,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -9403,7 +10369,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ adaptiveColor?: AdaptiveColor; @@ -9424,7 +10391,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurOptions?: BlurOptions; @@ -9436,7 +10404,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ policy?: BlurStyleActivePolicy; @@ -9448,7 +10417,8 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ inactiveColor?: ResourceColor; } @@ -9460,10 +10430,11 @@ declare interface BackgroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ForegroundEffectOptions { - + /** * Define the radius size of ForegroundEffect.The range of this value is [0, ∞) * @@ -9471,7 +10442,8 @@ declare interface ForegroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; } @@ -9491,7 +10463,8 @@ declare interface ForegroundEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PickerTextStyle { /** @@ -9509,7 +10482,8 @@ declare interface PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -9529,7 +10503,8 @@ declare interface PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; } @@ -9541,7 +10516,8 @@ declare interface PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PickerDialogButtonStyle { /** @@ -9551,7 +10527,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ButtonType; @@ -9562,7 +10539,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ButtonStyleMode; @@ -9573,7 +10551,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ role?: ButtonRole; @@ -9584,7 +10563,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length; @@ -9595,7 +10575,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -9606,7 +10587,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: FontWeight | number | string; @@ -9617,7 +10599,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -9628,7 +10611,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: Resource | string; @@ -9639,7 +10623,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -9650,7 +10635,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length | BorderRadiuses; @@ -9661,7 +10647,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ primary?: boolean; } @@ -9681,7 +10668,8 @@ declare interface PickerDialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ShadowType { /** @@ -9697,7 +10685,8 @@ declare enum ShadowType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR, @@ -9714,7 +10703,8 @@ declare enum ShadowType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLUR, } @@ -9751,7 +10741,8 @@ declare enum ShadowType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ShadowOptions { /** @@ -9786,7 +10777,8 @@ declare interface ShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number | Resource; @@ -9809,7 +10801,8 @@ declare interface ShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: ShadowType; @@ -9845,7 +10838,8 @@ declare interface ShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: Color | string | Resource | ColoringStrategy; @@ -9881,7 +10875,8 @@ declare interface ShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX?: number | Resource; @@ -9917,7 +10912,8 @@ declare interface ShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY?: number | Resource; @@ -9946,7 +10942,8 @@ declare interface ShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fill?: boolean; } @@ -9966,7 +10963,8 @@ declare interface ShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ShadowStyle { /** @@ -9982,7 +10980,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_XS, @@ -9999,7 +10998,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_SM, @@ -10016,7 +11016,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_MD, @@ -10033,7 +11034,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_DEFAULT_LG, @@ -10050,7 +11052,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_FLOATING_SM, @@ -10067,7 +11070,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OUTER_FLOATING_MD, } @@ -10087,7 +11091,8 @@ declare enum ShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MultiShadowOptions { /** @@ -10096,7 +11101,7 @@ declare interface MultiShadowOptions { *

**NOTE**: *
A value less than or equal to 0 is handled as the default value. *

- * + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10109,20 +11114,21 @@ declare interface MultiShadowOptions { *

**NOTE**: *
A value less than or equal to 0 is handled as the default value. *

- * + * * @type { ?(number | Resource) } * @default 20 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: number | Resource; /** * Offset on the x-axis. * Unit: vp. - * + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10132,13 +11138,14 @@ declare interface MultiShadowOptions { /** * Offset on the x-axis. * Unit: vp. - * + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX?: number | Resource; @@ -10161,7 +11168,8 @@ declare interface MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY?: number | Resource; } @@ -10180,7 +11188,8 @@ declare interface MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SafeAreaType { /** @@ -10195,7 +11204,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM, @@ -10211,7 +11221,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CUTOUT, @@ -10227,7 +11238,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ KEYBOARD } @@ -10246,7 +11258,8 @@ declare enum SafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SafeAreaEdge { /** @@ -10261,7 +11274,8 @@ declare enum SafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -10277,7 +11291,8 @@ declare enum SafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, @@ -10293,7 +11308,8 @@ declare enum SafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -10309,7 +11325,8 @@ declare enum SafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } @@ -10321,7 +11338,8 @@ declare enum SafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutSafeAreaType { /** @@ -10330,7 +11348,8 @@ declare enum LayoutSafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM = 0, } @@ -10342,7 +11361,8 @@ declare enum LayoutSafeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutSafeAreaEdge { /** @@ -10351,7 +11371,8 @@ declare enum LayoutSafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 0, @@ -10361,7 +11382,8 @@ declare enum LayoutSafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 1, @@ -10431,7 +11453,8 @@ declare enum LayoutSafeAreaEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetSize { /** @@ -10447,7 +11470,8 @@ declare enum SheetSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM, @@ -10464,7 +11488,8 @@ declare enum SheetSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LARGE, @@ -10481,11 +11506,26 @@ declare enum SheetSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 2, } +/** + * The modifier key state query function block. + * + * @typedef { function } ModifierKeyStateGetter + * @param { Array } keys - Indicate the modifier keys to query. + * @returns { boolean } - the query result + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ModifierKeyStateGetter = (keys: Array) => boolean; + /** * Defines the base event. * @@ -10518,7 +11558,8 @@ declare enum SheetSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BaseEvent { /** @@ -10553,7 +11594,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ target: EventTarget; @@ -10589,7 +11631,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -10625,7 +11668,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ source: SourceType; @@ -10637,7 +11681,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ axisHorizontal?: number; @@ -10649,7 +11694,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ axisVertical?: number; @@ -10678,7 +11724,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pressure: number; @@ -10707,7 +11754,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tiltX: number; @@ -10736,7 +11784,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tiltY: number; @@ -10748,7 +11797,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ rollAngle?: number; @@ -10777,7 +11827,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sourceTool: SourceTool; @@ -10794,6 +11845,18 @@ declare interface BaseEvent { */ getModifierKeyState?(keys: Array): boolean; + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + /** * Indicates the ID of the input device that triggers the current event. * @@ -10801,7 +11864,8 @@ declare interface BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId?: number; @@ -10812,7 +11876,8 @@ declare interface BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ targetDisplayId?: number; } @@ -10842,7 +11907,8 @@ declare interface BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BorderImageOption { /** @@ -10882,7 +11948,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slice?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -10912,7 +11979,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: RepeatMode, @@ -10951,6 +12019,19 @@ declare interface BorderImageOption { */ source?: string | Resource | LinearGradient, + /** + * Border image source + * + * @type { ?(string | Resource | LinearGradientOptions) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + source?: string | Resource | LinearGradientOptions, + /** * Border image width * @@ -10987,7 +12068,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -11027,7 +12109,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outset?: Length | EdgeWidths | LocalizedEdgeWidths, @@ -11059,7 +12142,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill?: boolean } @@ -11071,7 +12155,8 @@ declare interface BorderImageOption { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LayoutPolicy { /** @@ -11083,8 +12168,9 @@ declare class LayoutPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice - * @since 15 + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly matchParent: LayoutPolicy; /** @@ -11151,7 +12237,8 @@ declare class LayoutPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ClickEvent extends BaseEvent { /** @@ -11191,7 +12278,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11210,7 +12298,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11229,7 +12318,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11248,7 +12338,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -11306,7 +12397,8 @@ declare interface ClickEvent extends BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11342,7 +12434,8 @@ declare interface ClickEvent extends BaseEvent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -11353,7 +12446,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; @@ -11365,7 +12459,8 @@ declare interface ClickEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault: () => void; } @@ -11385,7 +12480,8 @@ declare interface ClickEvent extends BaseEvent { * @interface HoverEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HoverEvent extends BaseEvent { /** @@ -11394,7 +12490,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -11404,7 +12501,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -11414,7 +12512,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ windowX?: number; @@ -11424,7 +12523,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ windowY?: number; @@ -11434,7 +12534,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ displayX?: number; @@ -11444,7 +12545,8 @@ declare interface HoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ displayY?: number; @@ -11481,7 +12583,8 @@ declare interface HoverEvent extends BaseEvent { * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; } @@ -11501,7 +12604,8 @@ declare interface HoverEvent extends BaseEvent { * @interface MouseEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MouseEvent extends BaseEvent { /** @@ -11517,7 +12621,8 @@ declare interface MouseEvent extends BaseEvent { * @type { MouseButton } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ button: MouseButton; @@ -11534,7 +12639,8 @@ declare interface MouseEvent extends BaseEvent { * @type { MouseAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action: MouseAction; @@ -11571,7 +12677,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11588,7 +12695,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11605,7 +12713,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11622,7 +12731,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -11661,7 +12771,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11678,7 +12789,8 @@ declare interface MouseEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -11695,7 +12807,8 @@ declare interface MouseEvent extends BaseEvent { * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -11706,7 +12819,8 @@ declare interface MouseEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rawDeltaX?: number; @@ -11717,17 +12831,19 @@ declare interface MouseEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ rawDeltaY?: number; - + /** * Array of all mouse buttons that are currently pressed. * * @type { ?MouseButton[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressedButtons?: MouseButton[]; } @@ -11739,7 +12855,8 @@ declare interface MouseEvent extends BaseEvent { * @typedef AccessibilityHoverEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AccessibilityHoverEvent extends BaseEvent { /** @@ -11748,7 +12865,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { AccessibilityHoverType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: AccessibilityHoverType; @@ -11758,7 +12876,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -11768,7 +12887,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -11778,7 +12898,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11788,7 +12909,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11798,7 +12920,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -11808,7 +12931,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -11855,7 +12979,8 @@ declare interface AccessibilityHoverEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchObject { /** @@ -11880,7 +13005,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: TouchType; @@ -11906,7 +13032,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -11947,7 +13074,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -11966,7 +13094,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -11985,7 +13114,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -12004,7 +13134,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -12052,7 +13183,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -12078,7 +13210,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -12089,7 +13222,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; @@ -12100,7 +13234,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressedTime?: number; /** @@ -12110,7 +13245,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pressure?: number; @@ -12121,7 +13257,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number; @@ -12132,7 +13269,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; } @@ -12152,7 +13290,8 @@ declare interface TouchObject { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HistoricalPoint { /** @@ -12170,7 +13309,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ touchObject: TouchObject; @@ -12189,7 +13329,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size: number; @@ -12208,7 +13349,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ force: number; @@ -12227,7 +13369,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; } @@ -12257,7 +13400,8 @@ declare interface HistoricalPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchEvent extends BaseEvent { /** @@ -12282,7 +13426,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: TouchType; @@ -12308,7 +13453,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ touches: TouchObject[]; @@ -12334,7 +13480,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ changedTouches: TouchObject[]; @@ -12360,7 +13507,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -12379,7 +13527,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getHistoricalPoints(): Array; @@ -12391,7 +13540,8 @@ declare interface TouchEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault: () => void; } @@ -12403,7 +13553,8 @@ declare interface TouchEvent extends BaseEvent { * @interface AxisEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AxisEvent extends BaseEvent { /** @@ -12412,7 +13563,8 @@ declare interface AxisEvent extends BaseEvent { * @type { AxisAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ action: AxisAction; @@ -12442,7 +13594,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -12452,7 +13605,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -12462,7 +13616,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -12472,7 +13627,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -12482,7 +13638,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -12492,7 +13649,8 @@ declare interface AxisEvent extends BaseEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -12502,7 +13660,8 @@ declare interface AxisEvent extends BaseEvent { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ scrollStep?: number; @@ -12512,7 +13671,8 @@ declare interface AxisEvent extends BaseEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ propagation: Callback; @@ -12522,7 +13682,8 @@ declare interface AxisEvent extends BaseEvent { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ getHorizontalAxisValue(): number; @@ -12532,7 +13693,8 @@ declare interface AxisEvent extends BaseEvent { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ getVerticalAxisValue(): number; } @@ -12547,7 +13709,8 @@ declare interface AxisEvent extends BaseEvent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) => void; @@ -12571,14 +13734,31 @@ declare type SizeChangeCallback = (oldValue: SizeOptions, newValue: SizeOptions) * @param { BaseGestureEvent } event - the event information * @param { GestureRecognizer } current - the current gesture recognizer of the component * @param { Array } recognizers - the gesture recognizers of the component on the response chain - * @param { Array } touchRecognizers - the touch recognizers of the component on the response chain + * @param { Array } [touchRecognizers] - the touch recognizers of the component on the response chain + * @returns { GestureJudgeResult } the gesture judge result + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array, + touchRecognizers?: Array) => GestureJudgeResult; + +/** + * Defines the callback type used in onGestureRecognizerJudgeBegin. + * + * @typedef { function } GestureRecognizerJudgeBeginCallback + * @param { BaseGestureEvent } event - the event information + * @param { GestureRecognizer } current - the current gesture recognizer of the component + * @param { Array } recognizers - the gesture recognizers of the component on the response chain * @returns { GestureJudgeResult } the gesture judge result * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ -declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array, touchRecognizers?: Array) => GestureJudgeResult; +declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array) => GestureJudgeResult; /** * Defines the callback type used in shouldBuiltInRecognizerParallelWith. @@ -12590,20 +13770,22 @@ declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, cur * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ShouldBuiltInRecognizerParallelWithCallback = (current: GestureRecognizer, others: Array) => GestureRecognizer; /** * Defines the finish callback type used in transition. - * + * * @typedef { function } TransitionFinishCallback * @param { boolean } transitionIn - a boolean value indicates whether it is the callback of transitionIn or transitionOut. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TransitionFinishCallback = (transitionIn: boolean) => void; @@ -12647,13 +13829,26 @@ declare type TouchTestDoneCallback = (event: BaseGestureEvent, recognizers: Arra */ declare type PixelMap = import('../api/@ohos.multimedia.image').default.PixelMap; +/** + * Defines the PixelMap type object for ui component. + * + * @typedef { image.PixelMap } PixelMap + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PixelMap = image.PixelMap; + /** * pixelmap object with release function. * * @interface PixelMapMock * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PixelMapMock { /** @@ -12661,7 +13856,8 @@ declare interface PixelMapMock { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ release(): void; } @@ -12692,7 +13888,8 @@ declare interface PixelMapMock { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragBehavior { /** @@ -12714,7 +13911,8 @@ declare enum DragBehavior { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COPY, /** @@ -12736,7 +13934,8 @@ declare enum DragBehavior { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MOVE } @@ -12760,6 +13959,18 @@ declare enum DragBehavior { */ declare type UnifiedData = import('../api/@ohos.data.unifiedDataChannel').default.UnifiedData; +/** + * Import the UnifiedData type object for ui component. + * + * @typedef { unifiedDataChannel.UnifiedData } UnifiedData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type UnifiedData = unifiedDataChannel.UnifiedData; + /** * Import the Summary type object for ui component. * @@ -12777,6 +13988,17 @@ declare type UnifiedData = import('../api/@ohos.data.unifiedDataChannel').defaul */ declare type Summary = import('../api/@ohos.data.unifiedDataChannel').default.Summary; +/** + * Import the Summary type object for ui component. + * + * @typedef { unifiedDataChannel.Summary } Summary + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Summary = unifiedDataChannel.Summary; + /** * Import the UniformDataType type object for ui component. * @@ -12806,24 +14028,15 @@ declare type UniformDataType = import('../api/@ohos.data.uniformTypeDescriptor') declare type DataSyncOptions = import('../api/@ohos.data.unifiedDataChannel').default.GetDataParams; /** - * The type for SpringLoadingContext, see the detailed description in dragController. - * - * @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext; - -/** - * The type for DragSpringLoadingConfiguration, see the detailed description in dragController. + * Import the UniformDataType type object for ui component. * - * @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration + * @typedef { uniformTypeDescriptor.UniformDataType } UniformDataType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.2 */ -declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; +declare type UniformDataType = uniformTypeDescriptor.UniformDataType; /** * Import the DataLoadParams type object for ui component. @@ -12858,9 +14071,20 @@ declare type DataLoadParams = import('../api/@ohos.data.unifiedDataChannel').def * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragResult { + /** + * If the drag is not finished and the result is not set by receiver, return DragResult.UNKNOWN. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + UNKNOWN = -1, /** * If the drag is successful, return DragResult.DRAG_SUCCESSFUL. * @@ -12880,7 +14104,8 @@ declare enum DragResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_SUCCESSFUL = 0, /** @@ -12902,7 +14127,8 @@ declare enum DragResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_FAILED = 1, /** @@ -12916,7 +14142,8 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG_CANCELED = 2, /** @@ -12930,7 +14157,8 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DROP_ENABLED = 3, /** @@ -12944,14 +14172,15 @@ declare enum DragResult { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DROP_DISABLED = 4 } /** * Enum for BlendMode. - * Blend modes for compositing current component + * Blend modes for compositing current component * with overlapping content. Use overlapping content * as dst, current component as src. * @@ -12972,7 +14201,8 @@ declare enum DragResult { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlendMode { /** @@ -12990,7 +14220,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** @@ -13008,7 +14239,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLEAR = 1, /** @@ -13026,7 +14258,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC = 2, /** @@ -13036,7 +14269,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = d * @@ -13044,7 +14277,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST = 3, /** @@ -13062,7 +14296,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_OVER = 4, /** @@ -13072,7 +14307,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. * @@ -13080,7 +14315,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_OVER = 5, /** @@ -13098,7 +14334,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_IN = 6, /** @@ -13116,7 +14353,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_IN = 7, /** @@ -13134,7 +14372,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_OUT = 8, /** @@ -13152,7 +14391,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_OUT = 9, /** @@ -13172,7 +14412,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SRC_ATOP = 10, /** @@ -13191,7 +14432,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DST_ATOP = 11, /** @@ -13209,7 +14451,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XOR = 12, /** @@ -13228,7 +14471,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLUS = 13, /** @@ -13246,7 +14490,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODULATE = 14, /** @@ -13264,7 +14509,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREEN = 15, /** @@ -13282,7 +14528,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 16, /** @@ -13300,7 +14547,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DARKEN = 17, /** @@ -13318,7 +14566,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHTEN = 18, /** @@ -13336,7 +14585,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_DODGE = 19, /** @@ -13354,7 +14604,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_BURN = 20, /** @@ -13372,7 +14623,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HARD_LIGHT = 21, /** @@ -13390,7 +14642,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOFT_LIGHT = 22, /** @@ -13409,7 +14662,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIFFERENCE = 23, /** @@ -13427,7 +14681,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXCLUSION = 24, /** @@ -13447,7 +14702,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MULTIPLY = 25, /** @@ -13465,7 +14721,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HUE = 26, /** @@ -13483,7 +14740,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATURATION = 27, /** @@ -13501,7 +14759,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR = 28, /** @@ -13519,7 +14778,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LUMINOSITY = 29 } @@ -13545,7 +14805,8 @@ declare enum BlendMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlendApplyType { /** @@ -13563,7 +14824,8 @@ declare enum BlendApplyType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAST = 0, @@ -13584,7 +14846,8 @@ declare enum BlendApplyType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSCREEN = 1, } @@ -13611,7 +14874,8 @@ declare enum BlendApplyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragEvent { /** @@ -13656,7 +14920,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayX(): number; @@ -13682,7 +14947,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayY(): number; @@ -13708,7 +14974,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getWindowX(): number; @@ -13734,7 +15001,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getWindowY(): number; @@ -13761,20 +15029,20 @@ declare interface DragEvent { getY(): number; /** - * If copy is COPY, this DragEvent is a copy event. - * @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE. - * @default COPY - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ + * If copy is COPY, this DragEvent is a copy event. + * @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE. + * @default COPY + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ /** - * If copy is COPY, this DragEvent is a copy event. - * @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE. - * @default COPY - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ + * If copy is COPY, this DragEvent is a copy event. + * @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE. + * @default COPY + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ /** * If copy is COPY, this DragEvent is a copy event. * @type { DragBehavior } Operation, if use copy then set COPY, else set MOVE. @@ -13782,7 +15050,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dragBehavior: DragBehavior; @@ -13799,7 +15068,8 @@ declare interface DragEvent { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useCustomDropAnimation: boolean; @@ -13818,7 +15088,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setData(unifiedData: UnifiedData): void; @@ -13841,7 +15112,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getData(): UnifiedData; @@ -13860,7 +15132,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSummary(): Summary; @@ -13886,7 +15159,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setResult(dragResult: DragResult): void; @@ -13912,7 +15186,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getResult(): DragResult; @@ -13938,7 +15213,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewRect(): Rectangle; @@ -13957,7 +15233,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityX(): number; @@ -13976,7 +15253,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityY(): number; @@ -13995,7 +15273,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocity(): number; @@ -14022,6 +15301,18 @@ declare interface DragEvent { */ getModifierKeyState?(keys: Array): boolean; + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + /** * Setup one drop animation execution callback, which will be triggered by system when user drops. * Use this way to implement the custom drop animation instead of doing it in onDrop, as the system @@ -14034,7 +15325,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ executeDropAnimation(customDropAnimation: Callback): void; @@ -14045,7 +15337,7 @@ declare interface DragEvent { * @param { DataSyncOptions } options - the data sync options. * @returns { string } The data key returned by system, which can be used as the identify of the request. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 190003 - Operation not allowed for current pharse. + * @throws { BusinessError } 190003 - Operation not allowed for current phase. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 15 @@ -14124,7 +15416,8 @@ declare interface DragEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnDragEventCallback = (event: DragEvent, extraParams?: string) => void; @@ -14135,7 +15428,8 @@ declare type OnDragEventCallback = (event: DragEvent, extraParams?: string) => v * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DropOptions { @@ -14153,7 +15447,8 @@ declare interface DropOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ disableDataPrefetch?: boolean; } @@ -14197,7 +15492,8 @@ declare type IntentionCode = import('../api/@ohos.multimodalInput.intentionCode' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyEvent { /** @@ -14222,7 +15518,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: KeyType; @@ -14248,7 +15545,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyCode: number; @@ -14274,7 +15572,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyText: string; @@ -14300,7 +15599,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keySource: KeySource; @@ -14326,7 +15626,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: number; @@ -14355,7 +15656,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ metaKey: number; @@ -14381,7 +15683,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -14407,7 +15710,8 @@ declare interface KeyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: () => void; @@ -14426,7 +15730,8 @@ declare interface KeyEvent { * @default IntentionCode.INTENTION_UNKNOWN * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ intentionCode: IntentionCode; @@ -14453,13 +15758,26 @@ declare interface KeyEvent { */ getModifierKeyState?(keys: Array): boolean; + /** + * Query the modifier key press state, support 'ctrl'|'alt'|'shift' + * + * @type { ?ModifierKeyStateGetter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getModifierKeyState?: ModifierKeyStateGetter; + /** * Unicode of a key * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ unicode?: number; @@ -14501,7 +15819,8 @@ declare interface KeyEvent { * @interface FocusAxisEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusAxisEvent extends BaseEvent { /** @@ -14510,7 +15829,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @type { Map } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ axisMap: Map; @@ -14520,7 +15840,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: Callback; } @@ -14531,7 +15852,8 @@ declare interface FocusAxisEvent extends BaseEvent { * @interface CrownEvent * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CrownEvent { /** @@ -14540,7 +15862,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -14550,7 +15873,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angularVelocity: number; @@ -14560,7 +15884,8 @@ declare interface CrownEvent { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ degree: number; @@ -14570,7 +15895,8 @@ declare interface CrownEvent { * @type { CrownAction } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ action: CrownAction; @@ -14580,7 +15906,8 @@ declare interface CrownEvent { * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopPropagation: Callback; } @@ -14600,7 +15927,8 @@ declare interface CrownEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BindOptions { /** @@ -14620,7 +15948,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -14639,7 +15968,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: () => void; @@ -14658,7 +15988,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: () => void; @@ -14669,7 +16000,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: () => void; @@ -14680,7 +16012,8 @@ declare interface BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: () => void; } @@ -14718,6 +16051,42 @@ declare interface DismissContentCoverAction { reason: DismissReason; } +/** + * Component content cover dismiss + * + * @interface DismissContentCoverAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ +declare interface DismissContentCoverAction { + /** + * Defines content cover dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ + dismiss: VoidCallback; + + /** + * Defines content cover dismiss reason + * + * @type { DismissReason } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @arkts 1.2 + * @since 20 + */ + reason: DismissReason; +} + /** * Component content cover options * @@ -14735,14 +16104,15 @@ declare interface DismissContentCoverAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContentCoverOptions extends BindOptions { /** * Defines transition type * * @type { ?ModalTransition } - * @default ModalTransition.Default + * @default ModalTransition.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -14751,11 +16121,12 @@ declare interface ContentCoverOptions extends BindOptions { * Defines transition type * * @type { ?ModalTransition } - * @default ModalTransition.Default + * @default ModalTransition.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ modalTransition?: ModalTransition, @@ -14766,7 +16137,8 @@ declare interface ContentCoverOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -14777,7 +16149,8 @@ declare interface ContentCoverOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -14809,7 +16182,8 @@ declare interface ContentCoverOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SheetTitleOptions { /** @@ -14827,7 +16201,8 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title: ResourceStr; @@ -14846,7 +16221,8 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: ResourceStr; } @@ -14866,7 +16242,8 @@ declare interface SheetTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetType { /** @@ -14882,8 +16259,9 @@ declare enum SheetType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ BOTTOM = 0, /** @@ -14899,7 +16277,8 @@ declare enum SheetType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, @@ -14911,12 +16290,13 @@ declare enum SheetType { * @since 11 */ /** - * Popup sheet. The popup sheet cannot be dismissed with a pull-down gesture. + * Defines popup sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POPUP = 2, @@ -14929,6 +16309,16 @@ declare enum SheetType { * @since 20 */ SIDE = 3, + + /** + * Defines content cover type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CONTENT_COVER = 4, } /** @@ -14938,7 +16328,8 @@ declare enum SheetType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetMode { /** @@ -14948,7 +16339,8 @@ declare enum SheetMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 0, @@ -14967,7 +16359,8 @@ declare enum SheetMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED = 1, } @@ -14979,7 +16372,8 @@ declare enum SheetMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSizeMode { /** @@ -14988,7 +16382,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_DETENT = 0, @@ -14998,7 +16393,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUOUS = 1, } @@ -15010,7 +16406,8 @@ declare enum ScrollSizeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SheetKeyboardAvoidMode { /** @@ -15019,7 +16416,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -15030,7 +16428,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSLATE_AND_RESIZE = 1, @@ -15040,7 +16439,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_ONLY = 2, @@ -15051,7 +16451,8 @@ declare enum SheetKeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSLATE_AND_SCROLL = 3, @@ -15104,6 +16505,30 @@ declare interface SheetDismiss { dismiss: () => void; } +/** + * Component sheet dismiss + * + * @interface SheetDismiss + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface SheetDismiss { + /** + * Defines sheet dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + dismiss: VoidCallback; +} + /** * Component sheet dismiss * @@ -15127,39 +16552,137 @@ declare interface DismissSheetAction { dismiss: Callback; /** - * Dismiss reason type. + * Dismiss reason type. + * + * @type { DismissReason } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + reason: DismissReason; +} + +/** + * Component sheet dismiss + * + * @interface DismissSheetAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface DismissSheetAction { + + /** + * Defines sheet dismiss function + * + * @type { VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + dismiss: VoidCallback; + + /** + * Dismiss reason type. + * + * @type { DismissReason } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reason: DismissReason; +} + +/** + * Defines sheet spring back action + * + * @interface SpringBackAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare interface SpringBackAction { + /** + * Defines spring back function * - * @type { DismissReason } + * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - reason: DismissReason; + springBack: Callback; } /** - * Defines sheet spring back action + * Defines sheet spring back action * * @interface SpringBackAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ declare interface SpringBackAction { /** * Defines spring back function * - * @type { Callback } + * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ - springBack: Callback; + springBack: VoidCallback; } + +/** + * Defines the detent array of a single length. + * + * @typedef { [SheetSize | Length] } SingleLengthDetent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type SingleLengthDetent = [SheetSize | Length]; + +/** + * Defines the detent array of a two-length. + * + * @typedef { [(SheetSize | Length), SheetSize | Length | undefined] } DoubleLengthDetents + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DoubleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined]; + +/** + * Defines the detent array of a three-length. + * + * @typedef { [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined] } TripleLengthDetents + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type TripleLengthDetents = [(SheetSize | Length), SheetSize | Length | undefined, SheetSize | Length | undefined]; + /** * Component sheet options * @@ -15177,14 +16700,15 @@ declare interface SpringBackAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SheetOptions extends BindOptions { /** * Defines sheet height * * @type { ?(SheetSize | Length) } - * @default Sheet.LARGE + * @default SheetSize.LARGE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -15193,11 +16717,12 @@ declare interface SheetOptions extends BindOptions { * Defines sheet height * * @type { ?(SheetSize | Length) } - * @default Sheet.LARGE + * @default SheetSize.LARGE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: SheetSize | Length; @@ -15222,7 +16747,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dragBar?: boolean; @@ -15238,9 +16764,21 @@ declare interface SheetOptions extends BindOptions { */ enableFloatingDragBar?: boolean; + /** + * Defines transition type when preferType is SheetType.CONTENT_COVER. + * + * @type { ?ModalTransition } + * @default ModalTransition.DEFAULT + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + modalTransition?: ModalTransition; + /** * Mask color of the sheet. - * + * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -15248,12 +16786,13 @@ declare interface SheetOptions extends BindOptions { */ /** * Mask color of the sheet. - * + * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskColor?: ResourceColor; @@ -15290,9 +16829,21 @@ declare interface SheetOptions extends BindOptions { */ detents?: [(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?]; + /** + * Defines sheet detents + * + * @type { ?(SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + detents?: SingleLengthDetent | DoubleLengthDetents | TripleLengthDetents; + /** * Background blur of the sheet. By default, there is no background blur. - * + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15301,13 +16852,14 @@ declare interface SheetOptions extends BindOptions { */ /** * Background blur of the sheet. By default, there is no background blur. - * + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurStyle?: BlurStyle; @@ -15328,7 +16880,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showClose?: boolean | Resource; @@ -15355,7 +16908,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preferType?: SheetType; @@ -15374,7 +16928,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title?: SheetTitleOptions | CustomBuilder; @@ -15403,7 +16958,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shouldDismiss?: (sheetDismiss: SheetDismiss) => void; @@ -15425,7 +16981,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -15439,12 +16996,13 @@ declare interface SheetOptions extends BindOptions { *
If neither this callback nor **shouldDismiss** or **onWillDismiss** is registered, the sheet is dismissed by * default during the pull-down-to-dismiss operation. *

- * + * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillSpringBackWhenDismiss?: Callback; @@ -15475,7 +17033,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableOutsideInteractive?: boolean; @@ -15487,7 +17046,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -15507,7 +17067,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -15517,13 +17078,14 @@ declare interface SheetOptions extends BindOptions { *

**NOTE**: *
For bottom sheets, the bottom border color setting is ineffective. *

- * + * * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) } * @default Color.Black * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -15534,7 +17096,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -15546,7 +17109,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -15564,7 +17128,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onHeightDidChange?: Callback; @@ -15576,7 +17141,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: SheetMode; @@ -15588,7 +17154,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollSizeMode?: ScrollSizeMode; @@ -15603,7 +17170,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDetentsDidChange?: Callback; @@ -15614,7 +17182,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWidthDidChange?: Callback; @@ -15625,7 +17194,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTypeDidChange?: Callback; @@ -15636,7 +17206,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uiContext?: UIContext; @@ -15648,7 +17219,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: SheetKeyboardAvoidMode; @@ -15660,7 +17232,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -15672,7 +17245,8 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -15682,7 +17256,8 @@ declare interface SheetOptions extends BindOptions { * @type { ?Position } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -15694,18 +17269,20 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ effectEdge?: number /** * Defines sheet radius - * + * * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; @@ -15717,19 +17294,21 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ detentSelection?: SheetSize | Length; /** - * Whether to display in the sub window + * Whether to display in the sub window * - * @type { ?boolean } + * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -15742,23 +17321,38 @@ declare interface SheetOptions extends BindOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; /** * placement On target node * - * @type { ?boolean } + * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placementOnTarget?: boolean; } +/** + * The custom styles function block. + * + * @typedef { function } CustomStyles + * @param { CommonMethod } instance - The component instance which can be used to set common attributes. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type CustomStyles = (instance: CommonMethod) => void; + /** * Component State Styles. * @@ -15791,7 +17385,8 @@ declare interface SheetOptions extends BindOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StateStyles { /** @@ -15830,6 +17425,20 @@ declare interface StateStyles { */ normal?: any; + + /** + * Defines normal state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + normal?: CustomStyles; + /** * Defines pressed state styles. * @@ -15866,6 +17475,19 @@ declare interface StateStyles { */ pressed?: any; + /** + * Defines pressed state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pressed?: CustomStyles; + /** * Defines disabled state styles. * @@ -15902,6 +17524,19 @@ declare interface StateStyles { */ disabled?: any; + /** + * Defines disabled state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + disabled?: CustomStyles; + /** * Defines focused state styles. * @@ -15938,6 +17573,19 @@ declare interface StateStyles { */ focused?: any; + /** + * Defines focused state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + focused?: CustomStyles; + /** * Defines clicked state styles. * @@ -15974,6 +17622,19 @@ declare interface StateStyles { */ clicked?: any; + /** + * Defines clicked state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + clicked?: CustomStyles; + /** * Defines selected state styles. * @@ -15994,6 +17655,20 @@ declare interface StateStyles { * @since 11 */ selected?: object; + + /** + * Defines selected state styles. + * + * @type { ?CustomStyles } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: CustomStyles; + } /** @@ -16011,7 +17686,8 @@ declare interface StateStyles { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupMessageOptions { /** @@ -16029,7 +17705,8 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textColor?: ResourceColor; @@ -16048,7 +17725,8 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; } @@ -16060,16 +17738,18 @@ declare interface PopupMessageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare enum DismissReason { +declare enum DismissReason { /** * Touching the Back button, swiping left or right on the screen, or pressing the Esc key. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRESS_BACK = 0, @@ -16079,7 +17759,8 @@ declare enum DismissReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOUCH_OUTSIDE = 1, @@ -16089,7 +17770,8 @@ declare enum DismissReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLOSE_BUTTON = 2, @@ -16102,7 +17784,8 @@ declare enum DismissReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_DOWN = 3, @@ -16126,7 +17809,8 @@ declare enum DismissReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissPopupAction { /** @@ -16136,7 +17820,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -16147,7 +17832,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -16159,7 +17845,8 @@ declare interface DismissPopupAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupStateChangeParam { /** @@ -16170,7 +17857,8 @@ declare interface PopupStateChangeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isVisible: boolean; } @@ -16183,7 +17871,8 @@ declare interface PopupStateChangeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PopupStateChangeCallback = (event: PopupStateChangeParam) => void; @@ -16194,7 +17883,8 @@ declare type PopupStateChangeCallback = (event: PopupStateChangeParam) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupMaskType { /** @@ -16205,7 +17895,8 @@ declare interface PopupMaskType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ color: ResourceColor; } @@ -16251,7 +17942,8 @@ declare interface PopupBorderLinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupCommonOptions { /** @@ -16262,7 +17954,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -16273,7 +17966,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: ResourceColor; @@ -16285,7 +17979,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -16297,7 +17992,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -16308,7 +18004,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange?: PopupStateChangeCallback; @@ -16319,7 +18016,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -16327,10 +18025,12 @@ declare interface PopupCommonOptions { * Whether to display in the sub window. * * @type { ?boolean } + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -16343,7 +18043,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mask?: boolean | PopupMaskType; @@ -16354,7 +18055,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length; @@ -16362,10 +18064,12 @@ declare interface PopupCommonOptions { * Sets the position offset of the popup. * * @type { ?Position } + * @default { x: 0, y: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position; @@ -16376,7 +18080,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -16387,7 +18092,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -16399,7 +18105,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -16411,7 +18118,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -16423,7 +18131,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -16435,7 +18144,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -16447,7 +18157,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -16455,11 +18166,12 @@ declare interface PopupCommonOptions { * Set popup focusable * * @type { ?boolean } - * @default true + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; @@ -16470,7 +18182,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -16482,7 +18195,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; @@ -16494,7 +18208,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -16506,7 +18221,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; @@ -16530,7 +18246,7 @@ declare interface PopupCommonOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -16543,7 +18259,7 @@ declare interface PopupCommonOptions { * @since 20 */ borderWidth?: Dimension; - + /** * The LinearGradient of popup's outline. * @@ -16574,7 +18290,8 @@ declare interface PopupCommonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TipsOptions { @@ -16585,7 +18302,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ appearingTime?: number; @@ -16596,7 +18314,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disappearingTime?: number; @@ -16607,7 +18326,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ appearingTimeWithContinuousOperation?: number; @@ -16618,7 +18338,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disappearingTimeWithContinuousOperation?: number; @@ -16630,7 +18351,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -16641,7 +18363,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -16653,7 +18376,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -16665,20 +18389,58 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; /** - * The position of the tips. + * The position of the tips. + * + * @type { ?TipsAnchorType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + showAtAnchor?: TipsAnchorType; +} + +/** + * Defines the popup button. + * + * @interface PopupButton + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface PopupButton { + + /** + * Button text value + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value: string; + + /** + * action * - * @type { ?TipsAnchorType } + * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - showAtAnchor?: TipsAnchorType; + action: VoidCallback; } /** @@ -16703,7 +18465,8 @@ declare interface TipsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopupOptions { /** @@ -16728,7 +18491,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -16762,7 +18526,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -16844,6 +18609,17 @@ declare interface PopupOptions { action: () => void; }; + /** + * The first button. + * + * @type { ?PopupButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + primaryButton?: PopupButton; /** * The second button. * @@ -16922,6 +18698,18 @@ declare interface PopupOptions { action: () => void; }; + /** + * The second button. + * + * @type { ?PopupButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + secondaryButton?:PopupButton + /** * on State Change * @@ -16967,6 +18755,18 @@ declare interface PopupOptions { isVisible: boolean }) => void; + /** + * on State Change + * + * @type { ?PopupStateChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStateChange?: PopupStateChangeCallback; + /** * The offset of the sharp corner of popup. * @@ -16989,7 +18789,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -17012,10 +18813,12 @@ declare interface PopupOptions { * Whether to display in the sub window. * * @type { ?boolean } + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -17042,6 +18845,20 @@ declare interface PopupOptions { */ mask?: boolean | { color: ResourceColor }; + /** + * The mask to block gesture events of popup. + * When mask is set false, gesture events are not blocked. + * When mask is set true, gesture events are blocked and mask color is transparent. + * + * @type { ?(boolean | PopupMaskType) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mask?: boolean | PopupMaskType; + /** * Sets the options of popup message. * @@ -17057,7 +18874,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ messageOptions?: PopupMessageOptions @@ -17076,7 +18894,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length @@ -17096,7 +18915,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; /** @@ -17111,10 +18931,12 @@ declare interface PopupOptions { * Sets the position offset of the popup. * * @type { ?Position } + * @default { x: 0, y: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -17133,12 +18955,13 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: Color | string | Resource | number; /** - * Whether hide popup when click mask + * Whether hide popup when click mask. * * @type { ?boolean } * @default true @@ -17147,14 +18970,15 @@ declare interface PopupOptions { * @since 11 */ /** - * Whether hide popup when click mask + * Whether hide popup when click mask. * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -17173,7 +18997,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -17192,11 +19017,12 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; - /** + /** * The width of the arrow. * * @type { ?Dimension } @@ -17213,7 +19039,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -17234,7 +19061,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -17255,7 +19083,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -17276,7 +19105,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -17297,7 +19127,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -17308,7 +19139,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -17319,10 +19151,11 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; - + /** * Determine if it is compatible popup's half folded. * @@ -17331,7 +19164,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -17343,7 +19177,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; @@ -17355,7 +19190,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -17379,7 +19215,7 @@ declare interface PopupOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -17392,7 +19228,7 @@ declare interface PopupOptions { * @since 20 */ borderWidth?: Dimension; - + /** * The LinearGradient of popup's outline. * @@ -17438,7 +19274,8 @@ declare interface PopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomPopupOptions { /** @@ -17471,7 +19308,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; @@ -17479,6 +19317,7 @@ declare interface CustomPopupOptions { * placement of popup * * @type { ?Placement } + * @default Placement.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ @@ -17486,6 +19325,7 @@ declare interface CustomPopupOptions { * placement of popup * * @type { ?Placement } + * @default Placement.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -17499,7 +19339,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -17538,7 +19379,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popupColor?: Color | string | Resource | number; @@ -17565,19 +19407,20 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; /** - * whether hide popup when click mask + * whether hide popup when click mask. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * whether hide popup when click mask + * whether hide popup when click mask. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17597,7 +19440,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -17646,6 +19490,18 @@ declare interface CustomPopupOptions { isVisible: boolean }) => void; + /** + * on State Change + * + * @type { ?PopupStateChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStateChange?: PopupStateChangeCallback; + /** * The offset of the sharp corner of popup. * @@ -17675,7 +19531,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; @@ -17702,7 +19559,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -17729,6 +19587,20 @@ declare interface CustomPopupOptions { */ mask?: boolean | { color: ResourceColor }; + /** + * The mask to block gesture events of popup. + * When mask is set false, gesture events are not blocked. + * When mask is set true, gesture events are blocked and mask color is transparent. + * + * @type { ?(boolean | PopupMaskType) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mask?: boolean | PopupMaskType; + /** * Sets the space of between the popup and target. * @@ -17744,7 +19616,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetSpace?: Length @@ -17760,10 +19633,12 @@ declare interface CustomPopupOptions { * Sets the position offset of the popup. * * @type { ?Position } + * @default { x: 0, y: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position @@ -17782,7 +19657,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -17802,7 +19678,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPointPosition?: ArrowPointPosition; @@ -17828,7 +19705,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowWidth?: Dimension; @@ -17853,7 +19731,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ arrowHeight?: Dimension; @@ -17874,7 +19753,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension; @@ -17895,7 +19775,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -17916,7 +19797,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -17933,11 +19815,12 @@ declare interface CustomPopupOptions { * Set popup focusable * * @type { ?boolean } - * @default true + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; @@ -17948,7 +19831,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -17969,7 +19853,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: boolean | Callback; @@ -17981,7 +19866,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -17993,7 +19879,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ followTransformOfTarget?: boolean; @@ -18005,7 +19892,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -18029,7 +19917,7 @@ declare interface CustomPopupOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -18042,7 +19930,7 @@ declare interface CustomPopupOptions { * @since 20 */ borderWidth?: Dimension; - + /** * The LinearGradient of popup's outline. * @@ -18081,7 +19969,8 @@ declare interface CustomPopupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuPreviewMode { /** @@ -18097,8 +19986,9 @@ declare enum MenuPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ NONE = 0, /** * Defines image type preview content. @@ -18113,7 +20003,8 @@ declare enum MenuPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1 } @@ -18137,6 +20028,18 @@ declare enum MenuPreviewMode { */ declare type AnimationRange = [from: T, to: T]; +/** + * Defines the animator range of start and end property. + * + * @typedef { [number, number] } AnimationNumberRange + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type AnimationNumberRange = [number, number]; + /** * Defines the ContextMenu's preview animator options. * @@ -18152,14 +20055,15 @@ declare type AnimationRange = [from: T, to: T]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContextMenuAnimationOptions { /** * Sets the start animator scale and end animator scale. * * @type { ?AnimationRange } - * @default - + * @default [0.95, 1.1] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 @@ -18168,13 +20072,24 @@ interface ContextMenuAnimationOptions { * Sets the start animator scale and end animator scale. * * @type { ?AnimationRange } - * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ scale?: AnimationRange; + /** + * Sets the start animator scale and end animator scale. + * + * @type { ?AnimationNumberRange } + * @default - + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale?: AnimationNumberRange; /** * Defines the transition effect of menu preview opening and closing. * @@ -18182,7 +20097,8 @@ interface ContextMenuAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -18197,6 +20113,18 @@ interface ContextMenuAnimationOptions { */ hoverScale?: AnimationRange; + /** + * Sets the scale start and end animator of the image displayed before the custom builder preview is displayed. + * + * @type { ?AnimationNumberRange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + hoverScale?: AnimationNumberRange; + /** * Sets whether support to interrupt the process of hover scale. * @@ -18217,7 +20145,8 @@ interface ContextMenuAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses; @@ -18228,7 +20157,8 @@ type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HapticFeedbackMode { /** @@ -18237,8 +20167,9 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - */ + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ DISABLED = 0, /** * Defines menu always haptic feedback. @@ -18246,7 +20177,8 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLED = 1, /** @@ -18255,7 +20187,8 @@ declare enum HapticFeedbackMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 2 } @@ -18299,6 +20232,89 @@ declare enum ModalMode { TARGET_WINDOW = 2 } +/** + * Enum for accessibility action type + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +declare enum AccessibilityAction { + /** + * undefined action type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + UNDEFINED_ACTION = 0, + /** + * accessibility click action + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + ACCESSIBILITY_CLICK = 1, +} + +/** + * Enum for the result of accessibility action intercept function + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +declare enum AccessibilityActionInterceptResult { + /** + * intercept the accessibility action + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + ACTION_INTERCEPT = 0, + /** + * the accessibility action can be continued + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + ACTION_CONTINUE = 1, + /** + * the accessibility action need to bubble up for execution + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + ACTION_RISE = 2, +} + +/** + * Defines the callback type used in accessibility action intercept. + * The value of action indicates the accessibility action type. + * @typedef { function } AccessibilityActionInterceptCallback + * @param { AccessibilityAction } action - the enum of accessibility action type. + * @returns { AccessibilityActionInterceptResult } the result of continuing to execute the action or interrupting it or bubbling up + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction) => AccessibilityActionInterceptResult; + /** * Menu mask type * @@ -18350,7 +20366,7 @@ declare enum PreviewScaleMode { * @crossplatform * @atomicservice * @since 20 - */ + */ AUTO = 0, /** @@ -18360,7 +20376,7 @@ declare enum PreviewScaleMode { * @crossplatform * @atomicservice * @since 20 - */ + */ CONSTANT = 1, /** @@ -18370,8 +20386,8 @@ declare enum PreviewScaleMode { * @crossplatform * @atomicservice * @since 20 - */ - MAINTAIN = 2, + */ + MAINTAIN = 2 } /** @@ -18410,7 +20426,8 @@ declare enum AvailableLayoutArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContextMenuOptions { /** @@ -18446,7 +20463,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Position; @@ -18472,7 +20490,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placement?: Placement; @@ -18499,7 +20518,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableArrow?: boolean; @@ -18540,13 +20560,14 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowOffset?: Length; - + /** * The preview content of context menu. - * + * * @type { ?(MenuPreviewMode | CustomBuilder) } * @default MenuPreviewMode.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18568,18 +20589,21 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preview?: MenuPreviewMode | CustomBuilder; /** * Defines the border radius for preview of menu. * - * @type { BorderRadiusType } + * @type { ?BorderRadiusType } + * @default 16vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ previewBorderRadius?: BorderRadiusType; @@ -18597,7 +20621,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length | BorderRadiuses | LocalizedBorderRadiuses; @@ -18616,7 +20641,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: () => void; @@ -18635,7 +20661,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: () => void; @@ -18654,7 +20681,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToAppear?: () => void; @@ -18673,21 +20701,24 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToDisappear?: () => void; - + /** * The margin of menu's layoutRegion. * * @type { ?Margin } + * @default 12vp for left and right, 16vp for top and bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ layoutRegionMargin?: Margin; - + /** * The preview animator options. * @@ -18700,10 +20731,12 @@ declare interface ContextMenuOptions { * The preview animator options. * * @type { ?ContextMenuAnimationOptions } + * @default { scale: [0.95, 1.1], transition: undefined, hoverScale: undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewAnimationOptions?: ContextMenuAnimationOptions; @@ -18724,7 +20757,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -18745,7 +20779,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -18756,7 +20791,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -18767,7 +20803,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -18778,7 +20815,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition?: TransitionEffect; @@ -18786,11 +20824,12 @@ declare interface ContextMenuOptions { * Determine if it is compatible menu's half folded. * * @type { ?boolean } - * @default false + * @default true for 2-in-1 devices and false for other devices * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -18798,21 +20837,26 @@ declare interface ContextMenuOptions { * The color of menu's outer border. * * @type { ?(ResourceColor | EdgeColors) } + * @default '#19ffffff' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ outlineColor?: ResourceColor | EdgeColors; /** * The width of menu's outer border. + * If outline effects are required, outlineWidth is required. * * @type { ?(Dimension | EdgeOutlineWidths) } + * @default 0vp - Percentage values are not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ outlineWidth?: Dimension | EdgeOutlineWidths; @@ -18824,7 +20868,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hapticFeedbackMode?: HapticFeedbackMode; @@ -18832,6 +20877,7 @@ declare interface ContextMenuOptions { * Whether it is a menu without mask. * * @type { ?(boolean | MenuMaskType) } + * @default true when preview is enabled, or is false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18851,17 +20897,6 @@ declare interface ContextMenuOptions { */ modalMode?: ModalMode; - /** - * Defines the menu position. - * - * @type { ?Position } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - anchorPosition?: Position; - /** * Callback function when the menu appears. * @@ -18928,6 +20963,18 @@ declare interface ContextMenuOptions { * @since 20 */ availableLayoutArea?: AvailableLayoutArea; + + /** + * Defines the menu position. + * + * @type { ?Position } + * @default { x: 0, y: 0 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + anchorPosition?: Position; } /** @@ -18947,7 +20994,8 @@ declare interface ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuOptions extends ContextMenuOptions { /** @@ -18965,7 +21013,8 @@ declare interface MenuOptions extends ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title?: ResourceStr; @@ -18981,11 +21030,12 @@ declare interface MenuOptions extends ContextMenuOptions { * Whether to display in the sub window. * * @type { ?boolean } - * @default true for 2-in-1 devices and false for other devices + * @default true for 2-in-1 devices * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; } @@ -19003,7 +21053,8 @@ declare interface MenuOptions extends ContextMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ProgressMask { /** @@ -19025,7 +21076,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: number, total: number, color: ResourceColor); @@ -19044,7 +21096,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateProgress(value: number): void; @@ -19063,10 +21116,11 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateColor(value: ResourceColor): void; - + /** * Enable the breathe animation of mask. * @@ -19074,7 +21128,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableBreathingAnimation(value: boolean): void; } @@ -19092,7 +21147,8 @@ declare class ProgressMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TouchTestInfo { /** @@ -19110,7 +21166,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowX: number; @@ -19129,7 +21186,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowY: number; @@ -19148,7 +21206,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ parentX: number; @@ -19167,7 +21226,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ parentY: number; @@ -19186,7 +21246,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -19205,7 +21266,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -19224,7 +21286,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rect: RectResult; @@ -19243,7 +21306,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string; } @@ -19261,7 +21325,8 @@ declare class TouchTestInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TouchResult { /** @@ -19279,7 +21344,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strategy: TouchTestStrategy; @@ -19298,7 +21364,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; } @@ -19320,7 +21387,8 @@ declare class TouchResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PixelStretchEffectOptions { /** @@ -19342,7 +21410,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Length; @@ -19365,7 +21434,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Length; @@ -19388,7 +21458,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Length; @@ -19411,7 +21482,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Length; } @@ -19431,7 +21503,8 @@ declare interface PixelStretchEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ClickEffect { /** @@ -19449,7 +21522,8 @@ declare interface ClickEffect { * @default ClickEffectLevel.Light * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ level: ClickEffectLevel; @@ -19464,7 +21538,7 @@ declare interface ClickEffect { /** * Set scale number. * This default scale is same as the scale of click effect level. - * + * *

NOTE: *
This parameter works based on the setting of ClickEffectLevel. *
If level is set to ClickEffectLevel.LIGHT, the default value is 0.90. @@ -19475,7 +21549,8 @@ declare interface ClickEffect { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number; } @@ -19487,7 +21562,8 @@ declare interface ClickEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FadingEdgeOptions { /** @@ -19498,7 +21574,8 @@ declare interface FadingEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdgeLength?: LengthMetrics; } @@ -19516,7 +21593,8 @@ declare interface FadingEdgeOptions { * @interface NestedScrollOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollOptions { /** @@ -19533,7 +21611,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollForward: NestedScrollMode; @@ -19551,7 +21630,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBackward: NestedScrollMode; } @@ -19578,7 +21658,8 @@ declare interface NestedScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuElement { /** @@ -19603,7 +21684,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -19622,7 +21704,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -19642,6 +21725,7 @@ declare interface MenuElement { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -19664,7 +21748,8 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -19690,14 +21775,15 @@ declare interface MenuElement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action: () => void; } /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19705,7 +21791,7 @@ declare interface MenuElement { */ /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19716,7 +21802,7 @@ declare interface AttributeModifier { /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19724,7 +21810,7 @@ declare interface AttributeModifier { */ /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19735,7 +21821,7 @@ declare interface AttributeModifier { /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19743,7 +21829,7 @@ declare interface AttributeModifier { */ /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19754,7 +21840,7 @@ declare interface AttributeModifier { /** * Defines the focused update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19762,7 +21848,7 @@ declare interface AttributeModifier { */ /** * Defines the focused update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19773,7 +21859,7 @@ declare interface AttributeModifier { /** * Defines the disabled update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19781,7 +21867,7 @@ declare interface AttributeModifier { */ /** * Defines the disabled update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19792,7 +21878,7 @@ declare interface AttributeModifier { /** * Defines the selected update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19800,7 +21886,7 @@ declare interface AttributeModifier { */ /** * Defines the selected update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19810,20 +21896,92 @@ declare interface AttributeModifier { applySelectedAttribute?(instance: T) : void; } +/** + * Defines the attribute modifier. + * + * @interface AttributeModifier + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AttributeModifier { + + + /** + * Defines the normal update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyNormalAttribute?:(instance: T) => void; + + + /** + * Defines the pressed update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyPressedAttribute?:(instance: T) => void; + + /** + * Defines the focused update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyFocusedAttribute?:(instance: T) => void; + + + /** + * Defines the disabled update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyDisabledAttribute?:(instance: T) => void; + + + /** + * Defines the selected update attribute function. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applySelectedAttribute?:(instance: T) => void; +} /** * Defines the content modifier. - * + * * @interface ContentModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ContentModifier { /** * Defining applyContent function. - * + * * @returns { WrappedBuilder<[T]> } * Component attribute class, which is used to distinguish different information required by different components * after content areas are customized, for example, ButtonConfiguration for the Button component and @@ -19834,19 +21992,32 @@ declare interface ContentModifier { * @since 12 */ applyContent(): WrappedBuilder<[T]> + + /** + * Defining applyContent function. + * + * @returns { WrappedBuilder<[T]> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + applyContent(): WrappedBuilder> } /** * Defines the common configuration. - * + * * @interface CommonConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CommonConfiguration { - + /** * If the value is true, the contentModifier is available and can respond to operations such as triggerChange. * If it is set to false, triggerChange operations are not responded. @@ -19855,18 +22026,20 @@ declare interface CommonConfiguration { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean, /** * Obtains the contentModifier instance object - * + * * @type { ContentModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier: ContentModifier } @@ -19888,7 +22061,8 @@ declare interface CommonConfiguration { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum OutlineStyle { /** @@ -19906,7 +22080,8 @@ declare enum OutlineStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOLID = 0, @@ -19925,7 +22100,8 @@ declare enum OutlineStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DASHED = 1, @@ -19944,7 +22120,8 @@ declare enum OutlineStyle { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOTTED = 2, } @@ -19971,7 +22148,8 @@ declare enum OutlineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DragPreviewMode { /** @@ -19993,7 +22171,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 1, /** @@ -20015,7 +22194,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_SCALE = 2, /** @@ -20031,7 +22211,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DEFAULT_SHADOW = 3, /** @@ -20047,7 +22228,8 @@ declare enum DragPreviewMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DEFAULT_RADIUS = 4, /** @@ -20055,7 +22237,8 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_DRAG_ITEM_GRAY_EFFECT = 5, /** @@ -20063,7 +22246,8 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_MULTI_TILE_EFFECT = 6, /** @@ -20071,48 +22255,12 @@ declare enum DragPreviewMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLE_TOUCH_POINT_CALCULATION_BASED_ON_FINAL_PREVIEW = 7, } -/** - * Define drag start animation effect from drag preview to the handle drag image - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 19 - */ -declare enum DraggingSizeChangeEffect { - /** - * Default effect, no transition. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 19 - */ - DEFAULT = 0, - - /** - * Only scaled transition, this parameter take effect when PREVIEW_MODE is not DISABLE_SCALE. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 19 - */ - SIZE_TRANSITION = 1, - - /** - * Scaled and content transition together, this size transition take effect when PREVIEW_MODE is not DISABLE_SCALE. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 19 - */ - SIZE_CONTENT_TRANSITION = 2, -} - /** * Define the menu pop-up policy * @@ -20120,7 +22268,8 @@ declare enum DraggingSizeChangeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuPolicy { /** @@ -20129,7 +22278,8 @@ declare enum MenuPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -20139,7 +22289,8 @@ declare enum MenuPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIDE = 1, @@ -20149,7 +22300,8 @@ declare enum MenuPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHOW = 2, } @@ -20206,7 +22358,8 @@ declare type SymbolGlyphModifier = import('../api/arkui/SymbolGlyphModifier').Sy * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragPreviewOptions { /** @@ -20232,7 +22385,8 @@ declare interface DragPreviewOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: DragPreviewMode | Array; @@ -20271,7 +22425,8 @@ declare interface DragPreviewOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ numberBadge?: boolean | number; @@ -20282,7 +22437,8 @@ declare interface DragPreviewOptions { * @default DraggingSizeChangeEffect.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ sizeChangeEffect?: DraggingSizeChangeEffect; } @@ -20293,7 +22449,8 @@ declare interface DragPreviewOptions { * @interface DragInteractionOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DragInteractionOptions { /** @@ -20303,10 +22460,11 @@ declare interface DragInteractionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMultiSelectionEnabled?: boolean; - + /** * Define whether to execute animation before preview floating. * @@ -20314,31 +22472,34 @@ declare interface DragInteractionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ defaultAnimationBeforeLifting?: boolean; /** - * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. + * Define whether to enable the haptic feedback when dragging, the default value is false. * * @type { ?boolean } - * @default true + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - enableEdgeAutoScroll?: boolean; + enableHapticFeedback?: boolean; /** - * Define whether to enable the haptic feedback when dragging, the default value is false. + * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. * * @type { ?boolean } - * @default false + * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - enableHapticFeedback?: boolean; + enableEdgeAutoScroll?: boolean; /** * Define whether to lifting trigger drag by finger. @@ -20347,7 +22508,8 @@ declare interface DragInteractionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isLiftingDisabled?: boolean; } @@ -20358,7 +22520,8 @@ declare interface DragInteractionOptions { * @interface PreviewConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewConfiguration { /** @@ -20368,7 +22531,8 @@ declare interface PreviewConfiguration { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onlyForLifting?: boolean; @@ -20379,7 +22543,8 @@ declare interface PreviewConfiguration { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ delayCreating?: boolean; } @@ -20397,13 +22562,14 @@ declare interface PreviewConfiguration { * @interface InvertOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InvertOptions { /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20411,18 +22577,19 @@ declare interface InvertOptions { */ /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ low: number; /** * Defines the high value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20430,18 +22597,19 @@ declare interface InvertOptions { */ /** * Defines the high value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ high: number; /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20449,18 +22617,19 @@ declare interface InvertOptions { */ /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ threshold: number; - + /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20468,19 +22637,20 @@ declare interface InvertOptions { */ /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ thresholdRange: number; } /** * Import the CircleShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').CircleShape } CircleShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20492,7 +22662,7 @@ declare type CircleShape = import('../api/@ohos.arkui.shape').CircleShape; /** * Import the EllipseShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').EllipseShape } EllipseShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20504,7 +22674,7 @@ declare type EllipseShape = import('../api/@ohos.arkui.shape').EllipseShape; /** * Import the PathShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').PathShape } PathShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20516,7 +22686,7 @@ declare type PathShape = import('../api/@ohos.arkui.shape').PathShape; /** * Import the RectShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').RectShape } RectShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20534,7 +22704,8 @@ declare type RectShape = import('../api/@ohos.arkui.shape').RectShape; * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Optional = T | undefined; @@ -20545,7 +22716,8 @@ declare type Optional = T | undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TipsMessageType = ResourceStr | StyledString; @@ -20568,7 +22740,8 @@ declare type Matrix4Transit = import('../api/@ohos.matrix4').default.Matrix4Tran * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface BackgroundImageOptions { /** @@ -20581,7 +22754,8 @@ interface BackgroundImageOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad?: boolean; /** @@ -20593,7 +22767,8 @@ interface BackgroundImageOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: ImageRepeat; } @@ -20606,6 +22781,7 @@ interface BackgroundImageOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface BackgroundOptions { /** @@ -20635,12 +22811,14 @@ declare interface BackgroundOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ align?: Alignment; /** - * The set of edges for which to ignore layout safe area. The default value is LayoutSafeAreaEdge.ALL. To respect safe area insets on all edges, explicitly pass empty edge set. + * The set of edges for which to ignore layout safe area. To respect safe area insets on all edges, explicitly pass empty edge set. + * * @type { ?Array } - * @default LayoutSafeAreaEdge.ALL + * @default The default value is LayoutSafeAreaEdge.ALL when background is ResourceColor, otherwise it is an empty array []. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 @@ -20676,7 +22854,8 @@ declare interface BackgroundOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonMethod { /** @@ -20692,7 +22871,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -20734,7 +22914,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width(value: Length): T; /** @@ -20749,7 +22930,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ width(widthValue: Length | LayoutPolicy): T; @@ -20791,7 +22973,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height(value: Length): T; /** @@ -20806,10 +22989,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ height(heightValue: Length | LayoutPolicy): T; - + /** * Sets the drawModifier of the current component. * @@ -20820,7 +23004,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drawModifier(modifier: DrawModifier | undefined): T; @@ -20834,7 +23019,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customProperty(name: string, value: Optional): T; @@ -20850,7 +23036,7 @@ declare class CommonMethod { */ /** * Sets the safe area to be expanded to. - *
default:{types: [SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], + * default:{types: [SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], * edges: [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]} * * @param { Array } types - Indicates the types of the safe area. @@ -20859,7 +23045,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ expandSafeArea(types?: Array, edges?: Array): T; @@ -20912,7 +23099,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ responseRegion(value: Array | Rectangle): T; @@ -20933,7 +23121,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mouseResponseRegion(value: Array | Rectangle): T; @@ -20973,7 +23162,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size(value: SizeOptions): T; @@ -21017,7 +23207,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constraintSize(value: ConstraintSizeOptions): T; @@ -21060,7 +23251,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hitTestBehavior(value: HitTestMode): T; @@ -21081,7 +23273,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChildTouchTest(event: (value: Array) => TouchResult): T; @@ -21123,7 +23316,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutWeight(value: number | string): T; @@ -21136,7 +23330,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ chainWeight(chainWeight: ChainWeightOptions): T; @@ -21188,7 +23383,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Length | LocalizedPadding): T; @@ -21203,10 +23399,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ safeAreaPadding(paddingValue: Padding | LengthMetrics | LocalizedPadding): T; - + /** * Outer Margin. * @@ -21255,7 +23452,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin(value: Margin | Length | LocalizedMargin): T; @@ -21264,8 +23462,8 @@ declare class CommonMethod { * * @param { CustomBuilder } builder - Custom background. * @param { object } options - Alignment mode between the custom background and the component. - *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time - *
They will all take effect, with **background** at the top layer. + *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time + *
They will all take effect, with **background** at the top layer. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21276,22 +23474,20 @@ declare class CommonMethod { * * @param { CustomBuilder } builder - Custom background. * @param { object } options - Alignment mode between the custom background and the component. - *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time - *
They will all take effect, with **background** at the top layer. + *
If **background**, **backgroundColor**, and **backgroundImage** are set at the same time + *
They will all take effect, with **background** at the top layer. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - background(builder: CustomBuilder, options?: { align?: Alignment }): T; - /** * Add a background for the component. * * Anonymous Object Rectification. * @param { CustomBuilder | ResourceColor } content - * @param { BackgroundOptions } options + * @param { BackgroundOptions } [options] * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21300,6 +23496,21 @@ declare class CommonMethod { */ background(content: CustomBuilder | ResourceColor, options?: BackgroundOptions): T; + /** + * Add a background for the component. + * + * Anonymous Object Rectification. + * @param { CustomBuilder } builder + * @param { BackgroundOptions } options + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + background(builder: CustomBuilder, options?: BackgroundOptions): T; + /** * Background color * @@ -21336,7 +23547,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): T; @@ -21349,7 +23561,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(color: Optional): T; @@ -21376,7 +23589,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pixelRound(value: PixelRoundPolicy): T; @@ -21437,7 +23651,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImage(src: ResourceStr | PixelMap, repeat?: ImageRepeat): T; @@ -21445,16 +23660,17 @@ declare class CommonMethod { * Background image * * @param { ResourceStr | PixelMap } src - the background image source - * @param { BackgroundImageOptions } options - config the options + * @param { BackgroundImageOptions } [options] - config the options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImage(src: ResourceStr | PixelMap, options?: BackgroundImageOptions): T; - + /** * Background image size * @@ -21491,7 +23707,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImageSize(value: SizeOptions | ImageSize): T; @@ -21535,14 +23752,15 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImagePosition(value: Position | Alignment): T; /** * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * It encapsulates various blur radius, mask color, mask opacity, saturation + * and brightness values through enum values. * * @param { BlurStyle } value - Settings of the background blur style *
including the blur radius, mask color, mask opacity, saturation, and brightness. @@ -21554,8 +23772,8 @@ declare class CommonMethod { */ /** * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * It encapsulates various blur radius, mask color, mask opacity, saturation + * and brightness values through enum values. * * @param { BlurStyle } value - Settings of the background blur style *
including the blur radius, mask color, mask opacity, saturation, and brightness. @@ -21568,8 +23786,8 @@ declare class CommonMethod { */ /** * Defines the blur style to apply between the background and content of a component. - * It encapsulates various blur radius, mask color, mask opacity, saturation. - * And brightness values through enum values. + * It encapsulates various blur radius, mask color, mask opacity, saturation + * and brightness values through enum values. * * @param { BlurStyle } value - Settings of the background blur style *
including the blur radius, mask color, mask opacity, saturation, and brightness. @@ -21579,16 +23797,17 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T; /** * Background blur style. - * blurStyle:Blur style type. * - * @param { Optional } style - * @param { BackgroundBlurStyleOptions } [options] + * @param { Optional } style - Settings of the background blur style + *
including the blur radius, mask color, mask opacity, saturation, and brightness. + * @param { BackgroundBlurStyleOptions } [options] - Background blur options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21598,23 +23817,6 @@ declare class CommonMethod { */ backgroundBlurStyle(style: Optional, options?: BackgroundBlurStyleOptions): T; - /** - * Background blur style. - * blurStyle:Blur style type. - * sysOptions: system adaptive options. - * - * @param { Optional } style - * @param { BackgroundBlurStyleOptions } [options] - * @param { SystemAdaptiveOptions } [sysOptions] - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 19 - */ - backgroundBlurStyle(style: Optional, options?: BackgroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; - /** * Sets the background effect of the component, including the blur radius, brightness, saturation, and color. * @@ -21632,28 +23834,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect(options: BackgroundEffectOptions): T; - /** - * Sets the background effect of the component, including the blur radius, brightness, - * saturation, and color. Compared to backgroundEffect11+, - * this API supports the **undefined** type for the **options** parameter. - * - * @param { Optional } options - Background effect, including saturation, - * brightness, and color. - *
If **options** is **undefined**, the background reverts to its default state with no effect. - * @param { SystemAdaptiveOptions } [ sysOptions ] - System adaptive adjustment options. - *
Default value: **{ disableSystemAdaptation: false }**. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - backgroundEffect(options: Optional): T; - /** * options:background effect options. * sysOptions: system adaptive options. @@ -21664,7 +23849,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect(options: Optional, sysOptions?: SystemAdaptiveOptions): T; @@ -21677,7 +23863,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundImageResizable(value: ResizableOptions): T; @@ -21689,7 +23876,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundEffect(options: ForegroundEffectOptions): T; @@ -21701,7 +23889,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ visualEffect(effect: VisualEffect): T; @@ -21713,7 +23902,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundFilter(filter: Filter): T; @@ -21725,7 +23915,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundFilter(filter: Filter): T; @@ -21737,7 +23928,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compositingFilter(filter: Filter): T; @@ -21760,7 +23952,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundBlurStyle(value: BlurStyle, options?: ForegroundBlurStyleOptions): T; @@ -21778,22 +23971,6 @@ declare class CommonMethod { */ foregroundBlurStyle(style: Optional, options?: ForegroundBlurStyleOptions): T; - /** - * Foreground blur style. - * blurStyle:Blur style type. - * sysOptions: system adaptive options. - * - * @param { Optional } style - * @param { ForegroundBlurStyleOptions } [options] - * @param { SystemAdaptiveOptions } [sysOptions] - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - foregroundBlurStyle(style: Optional, options?: ForegroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; - /** * Sets the opacity of the component. * @@ -21830,7 +24007,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ opacity(value: number | Resource): T; @@ -21843,7 +24021,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ opacity(opacity: Optional): T; @@ -21886,7 +24065,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ border(value: BorderOptions): T; @@ -21927,7 +24107,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle(value: BorderStyle | EdgeStyles): T; @@ -21979,7 +24160,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth(value: Length | EdgeWidths | LocalizedEdgeWidths): T; @@ -22030,7 +24212,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor(value: ResourceColor | EdgeColors | LocalizedEdgeColors): T; @@ -22082,7 +24265,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius(value: Length | BorderRadiuses | LocalizedBorderRadiuses): T; @@ -22114,7 +24298,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderImage(value: BorderImageOption): T; @@ -22137,7 +24322,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outline(value: OutlineOptions): T; @@ -22152,7 +24338,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outline(options: Optional): T; @@ -22177,7 +24364,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineStyle(value: OutlineStyle | EdgeOutlineStyles): T; @@ -22194,7 +24382,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineStyle(style: Optional): T; @@ -22221,7 +24410,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineWidth(value: Dimension | EdgeOutlineWidths): T; @@ -22237,7 +24427,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineWidth(width: Optional): T; @@ -22262,7 +24453,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineColor(value: ResourceColor | EdgeColors | LocalizedEdgeColors): T; @@ -22279,7 +24471,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineColor(color: Optional): T; @@ -22308,7 +24501,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ outlineRadius(value: Dimension | OutlineRadiuses): T; @@ -22327,7 +24521,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ outlineRadius(radius: Optional): T; @@ -22352,7 +24547,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundColor(value: ResourceColor | ColoringStrategy): T; @@ -22368,7 +24564,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ foregroundColor(color: Optional): T; @@ -22413,16 +24610,17 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onClick(event: (event: ClickEvent) => void): T; /** - * Trigger a click event when a click is clicked, move distance should smaller than distanceThreshold. + * Trigger a click event when a click is clicked, move distance should smaller than distanceThreshold. * *

NOTE: *
If the distanceThreshold value specified is less than or equal to 0 vp, it will be converted to the default value. - *
Since API version 9, the following constraints apply when this API is used in service widgets: + *
Since API version 12, the following constraints apply when this API is used in service widgets: *
Click events cannot be triggered if the finger is pressed for more than 800 ms. *
Click events cannot be triggered if the finger moves more than 20 px after pressing down. *

@@ -22434,7 +24632,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick(event: Callback, distanceThreshold: number): T; @@ -22454,22 +24653,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onHover(event: (isHover: boolean, event: HoverEvent) => void): T; - /** - * Trigger a hover move event. - * - * @param { Callback } event - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - onHoverMove(event: Callback): T; - /** * Trigger a accessibility hover event. * @@ -22478,7 +24666,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onAccessibilityHover(callback: AccessibilityCallback): T; @@ -22494,7 +24683,7 @@ declare class CommonMethod { * @since 20 */ onAccessibilityHoverTransparent(callback: AccessibilityTransparentCallback): T; - + /** * Set hover effect. * @@ -22520,7 +24709,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hoverEffect(value: HoverEffect): T; @@ -22539,7 +24729,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onMouse(event: (event: MouseEvent) => void): T; @@ -22568,7 +24759,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTouch(event: (event: TouchEvent) => void): T; @@ -22597,7 +24789,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEvent(event: (event: KeyEvent) => void): T; @@ -22609,18 +24802,20 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEvent(event: Callback): T; /** * Digital crown input. * - * @param { Callback } event + * @param { Optional> } handler * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDigitalCrown(handler: Optional>): T; @@ -22632,7 +24827,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyPreIme(event: Callback): T; @@ -22644,7 +24840,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onKeyEventDispatch(event: Callback): T; @@ -22655,7 +24852,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onFocusAxisEvent(event: Callback): T; @@ -22666,7 +24864,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ onAxisEvent(event: Callback): T; @@ -22692,13 +24891,14 @@ declare class CommonMethod { * Components that have default interaction logic, such as Button and TextInput, are focusable by default. Other * components, such as Text and Image, are not focusable by default. Only focusable components can trigger a focus * event. - * + * * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ focusable(value: boolean): T; @@ -22710,7 +24910,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ nextFocus(nextStep: Optional): T; @@ -22722,10 +24923,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ tabStop(isTabStop: boolean): T; - + /** * Trigger a event when got focus. * @@ -22751,7 +24953,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFocus(event: () => void): T; @@ -22780,7 +24983,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBlur(event: () => void): T; @@ -22809,7 +25013,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ tabIndex(index: number): T; @@ -22838,7 +25043,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultFocus(value: boolean): T; @@ -22868,7 +25074,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ groupDefaultFocus(value: boolean): T; @@ -22897,7 +25104,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ focusOnTouch(value: boolean): T; @@ -22909,7 +25117,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusBox(style: FocusBoxStyle): T; @@ -22922,7 +25131,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopeId(id: string, isGroup?: boolean): T; /** @@ -22936,7 +25146,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopeId(id: string, isGroup?: boolean, arrowStepOut?: boolean): T; @@ -22949,7 +25160,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ focusScopePriority(scopeId: string, priority?: FocusPriority): T; @@ -22989,7 +25201,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ animation(value: AnimateParam): T; @@ -23037,6 +25250,20 @@ declare class CommonMethod { */ transition(value: TransitionOptions | TransitionEffect): T; + /** + * Set the transition effect of component when it appears and disappears. + * + * @param { TransitionEffect } value - transition effect + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + transition(value: TransitionEffect): T; + /** * Set the transition effect of component when it appears and disappears. * @@ -23047,7 +25274,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition(effect: TransitionEffect, onFinish: Optional): T; @@ -23082,7 +25310,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gesture(gesture: GestureType, mask?: GestureMask): T; @@ -23117,7 +25346,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ priorityGesture(gesture: GestureType, mask?: GestureMask): T; @@ -23152,7 +25382,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ parallelGesture(gesture: GestureType, mask?: GestureMask): T; @@ -23194,32 +25425,17 @@ declare class CommonMethod { * The larger the blurring radius, the more blurring the content. * If the value is 0, the content blurring effect is not blurring. * - * @param { number } value - value indicates radius of backdrop blur. - * @param { BlurOptions } [options] - options indicates blur options. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - blur(value: number, options?: BlurOptions): T; - - /** - * Adds the content blurring effect for the current component. The input parameter is the blurring radius. - * The larger the blurring radius, the more blurring the content. - * If the value is 0, the content blurring effect is not blurring. - * - * @param { Optional } blurRadius - value indicates radius of backdrop blur. + * @param { number } value - value indicates radius of backdrop blur. * @param { BlurOptions } [options] - options indicates blur options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - blur(blurRadius: Optional, options?: BlurOptions): T; + blur(value: number, options?: BlurOptions): T; /** * Adds the content blurring effect for the current component. The input parameter is the blurring radius. @@ -23228,15 +25444,14 @@ declare class CommonMethod { * * @param { Optional } blurRadius - value indicates radius of backdrop blur. * @param { BlurOptions } [options] - options indicates blur options. - * @param { SystemAdaptiveOptions } [sysOptions] - system adaptive options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 19 + * @since 18 */ - blur(blurRadius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; + blur(blurRadius: Optional, options?: BlurOptions): T; /** * Applies a linear gradient foreground blur effect to the component. @@ -23247,7 +25462,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradientBlur(value: number, options: LinearGradientBlurOptions): T; @@ -23260,7 +25476,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradientBlur(blurRadius: Optional, options: Optional): T; @@ -23284,7 +25501,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ motionBlur(value: MotionBlurOptions):T; @@ -23296,7 +25514,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ motionBlur(motionBlur: Optional):T; @@ -23364,7 +25583,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ brightness(value: number): T; @@ -23387,7 +25607,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ brightness(brightness: Optional): T; @@ -23459,7 +25680,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contrast(value: number): T; @@ -23482,7 +25704,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contrast(contrast: Optional): T; @@ -23558,7 +25781,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale(value: number): T; @@ -23581,7 +25805,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ grayscale(grayscale: Optional): T; @@ -23621,7 +25846,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colorBlend(value: Color | string | Resource): T; @@ -23636,7 +25862,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ colorBlend(color: Optional): T; @@ -23708,7 +25935,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ saturate(value: number): T; @@ -23731,7 +25959,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ saturate(saturate: Optional): T; @@ -23779,7 +26008,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sepia(value: number): T; @@ -23796,7 +26026,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sepia(sepia: Optional): T; @@ -23840,7 +26071,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ invert(value: number | InvertOptions): T; @@ -23864,7 +26096,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ invert(options: Optional): T; @@ -23874,7 +26107,8 @@ declare class CommonMethod { * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ systemBarEffect(): T; @@ -23926,7 +26160,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hueRotate(value: number | string): T; @@ -23940,7 +26175,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hueRotate(rotation: Optional): T; @@ -23981,7 +26217,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useShadowBatching(value: boolean): T; @@ -24006,7 +26243,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useShadowBatching(use: Optional): T; @@ -24019,13 +26257,14 @@ declare class CommonMethod { *
The value **true** means to apply the effect defined by the parent **EffectComponent** * or the window. *
Default value: **false**. - * @param { EffectType } [effectType] - Type of effect to apply to the component, which is defined by + * @param { EffectType } effectType - Type of effect to apply to the component, which is defined by * the parent **EffectComponent** or the window. *
Default value: **EffectType.DEFAULT**. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(useEffect: boolean, effectType: EffectType): T; @@ -24047,7 +26286,8 @@ declare class CommonMethod { * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(useEffect: Optional, effectType?: EffectType): T; @@ -24061,7 +26301,8 @@ declare class CommonMethod { * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useEffect(value: boolean): T; @@ -24110,7 +26351,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backdropBlur(value: number, options?: BlurOptions): T; @@ -24129,22 +26371,6 @@ declare class CommonMethod { */ backdropBlur(radius: Optional, options?: BlurOptions): T; - /** - * Adds the background blur effect for the current component. The input parameter is the blur radius. - * The larger the blur radius, the more blurred the background. If the value is 0, the background blur is not blurred. - * - * @param { Optional } radius - radius indicates radius of backdrop blur. - * @param { BlurOptions } [options] - options indicates the backdrop blur options. - * @param { SystemAdaptiveOptions } [sysOptions] - system adaptive options. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 19 - */ - backdropBlur(radius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; - /** * Sets whether the component and its child components are rendered off * the screen as a whole before being blended with its parent. @@ -24191,7 +26417,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderGroup(value: boolean): T; @@ -24211,7 +26438,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderGroup(isGroup: Optional): T; @@ -24228,7 +26456,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ freeze(value: boolean): T; @@ -24247,7 +26476,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ freeze(freeze: Optional): T; @@ -24291,7 +26521,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(value: TranslateOptions): T; @@ -24309,7 +26540,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ translate(translate: Optional): T; @@ -24357,7 +26589,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(value: ScaleOptions): T; @@ -24374,7 +26607,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ scale(options: Optional): T; @@ -24482,7 +26716,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(value: RotateOptions): T; @@ -24495,7 +26730,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(options: Optional): T; @@ -24537,7 +26773,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transform(value: object): T; @@ -24551,7 +26788,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transform(transform: Optional): T; @@ -24604,7 +26842,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear(event: () => void): T; @@ -24644,7 +26883,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDisAppear(event: () => void): T; @@ -24660,6 +26900,19 @@ declare class CommonMethod { */ onAttach(callback: Callback): T; + /** + * This callback is triggered when a component mounts to view tree. + * + * @param { VoidCallback } callback + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onAttach(callback: VoidCallback): T; + /** * This callback is triggered when a component is detached from view tree. * @@ -24672,6 +26925,19 @@ declare class CommonMethod { */ onDetach(callback: Callback): T; + /** + * This callback is triggered when a component is detached from view tree. + * + * @param { VoidCallback } callback + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDetach(callback: VoidCallback): T; + /** * This callback is triggered when the size or position of this component change finished. * @@ -24697,7 +26963,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAreaChange(event: (oldValue: Area, newValue: Area) => void): T; @@ -24737,7 +27004,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ visibility(value: Visibility): T; @@ -24778,7 +27046,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexGrow(value: number): T; @@ -24819,7 +27088,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexShrink(value: number): T; @@ -24860,7 +27130,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flexBasis(value: number | string): T; @@ -24901,7 +27172,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignSelf(value: ItemAlign): T; @@ -24955,7 +27227,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayPriority(value: number): T; @@ -24995,7 +27268,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ zIndex(value: number): T; @@ -25045,7 +27319,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sharedTransition(id: string, options?: sharedTransitionOptions): T; @@ -25086,7 +27361,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction(value: Direction): T; @@ -25127,7 +27403,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ align(value: Alignment): T; @@ -25144,19 +27421,6 @@ declare class CommonMethod { */ align(alignment: Alignment | LocalizedAlignment): T; - /** - * Defines the align rules of child component in Stack container. - * - * @param { LocalizedAlignment } alignment - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - layoutGravity(alignment: LocalizedAlignment): T; - /** * position * @@ -25205,7 +27469,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position(value: Position | Edges | LocalizedEdges): T; @@ -25257,7 +27522,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ markAnchor(value: Position | LocalizedPosition): T; @@ -25314,7 +27580,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset(value: Position | Edges | LocalizedEdges): T; @@ -25358,7 +27625,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enabled(value: boolean): T; @@ -25408,7 +27676,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(value: AlignRuleOption): T; @@ -25425,7 +27694,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignRules(alignRule: LocalizedAlignRuleOptions): T; @@ -25442,7 +27712,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ chainMode(direction: Axis, style: ChainStyle): T; @@ -25487,7 +27758,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ aspectRatio(value: number): T; @@ -25508,7 +27780,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clickEffect(value: ClickEffect | null): T; @@ -25520,13 +27793,14 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clickEffect(effect: Optional): T; /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. - * (To be triggered, press and hold for 170 milliseconds (ms)) + * (To be triggered, press and hold for 500 milliseconds (ms) and then finger move a distance greater than 10 vp) * * @param { function } event * @returns { T } @@ -25535,7 +27809,7 @@ declare class CommonMethod { */ /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. - * (To be triggered, press and hold for 170 milliseconds (ms)) + * (To be triggered, press and hold for 500 milliseconds (ms) and then finger move a distance greater than 10 vp) * * @param { function } event * @returns { T } @@ -25545,7 +27819,7 @@ declare class CommonMethod { */ /** * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. - * (To be triggered, press and hold for 170 milliseconds (ms)) + * (To be triggered, press and hold for 500 milliseconds (ms) and then finger move a distance greater than 10 vp) * * NOTE:
* The global builder is not supported. @@ -25555,7 +27829,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragStart(event: (event: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): T; @@ -25584,7 +27859,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragEnter(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25613,7 +27889,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragMove(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25642,7 +27919,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragLeave(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25674,7 +27952,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDrop(event: (event: DragEvent, extraParams?: string) => void): T; @@ -25688,7 +27967,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onDrop(eventCallback: OnDragEventCallback, dropOptions?: DropOptions): T; @@ -25717,40 +27997,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDragEnd(event: (event: DragEvent, extraParams?: string) => void): T; - /** - * Enables the component as a drag-and-drop target with spring loading functionality. - * - * When a dragged object hovers over the target, it triggers a callback notification. Spring Loading is an enhanced - * feature for drag-and-drop operations, allowing users to automatically trigger view transitions during dragging - * by hovering (hover) without needing to use another hand. - * This feature is primarily designed to enhance the smoothness and efficiency of drag-and-drop operations. Below are - * some common scenarios suitable for supporting this feature: - * - In a file manager, when dragging a file and hovering over a folder, the folder is automatically opened. - * - On a desktop launcher, when dragging a file and hovering over an application icon, the application is - * automatically opened. - * - * Please note: - * 1. Registering spring-loaded or drag-and-drop events (onDragEnter/Move/Leave/Drop) on a component makes it a - * drag-and-drop target. Only one target can be the responder at the same time when user drags and hovers on, and - * child components always have higher priority. - * 2. Once a complete spring loading is triggered on a component, new spring loading detection will only occur after the - * dragged object leaves and re-enters the component's range. - * - * @param { Callback | null } callback Registers the callback for spring loading response, or - * sets it to null to disable the support for spring loading. - * @param { DragSpringLoadingConfiguration } [configuration] The initialized spring loading configuration which is - * only used when the entire spring detecting. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - onDragSpringLoading(callback: Callback | null, configuration?: DragSpringLoadingConfiguration): T; - /** * Allowed drop uniformData type for this node. * @@ -25778,7 +28029,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ allowDrop(value: Array | null): T; @@ -25799,7 +28051,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): T; @@ -25818,7 +28071,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreview(value: CustomBuilder | DragItemInfo | string): T; @@ -25830,7 +28084,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreview(preview: CustomBuilder | DragItemInfo | string, config?: PreviewConfiguration): T; @@ -25850,7 +28105,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dragPreviewOptions(value: DragPreviewOptions, options?: DragInteractionOptions): T; @@ -25861,7 +28117,8 @@ declare class CommonMethod { * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPreDrag(callback: Callback): T; @@ -25917,7 +28174,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ overlay(value: string | CustomBuilder | ComponentContent, options?: OverlayOptions): T; @@ -26015,7 +28273,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradient(value: LinearGradientOptions): T; @@ -26033,7 +28292,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ linearGradient(options: Optional): T; @@ -26203,7 +28463,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sweepGradient(value: SweepGradientOptions): T; @@ -26218,7 +28479,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sweepGradient(options: Optional): T; @@ -26341,7 +28603,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radialGradient(value: RadialGradientOptions): T; @@ -26356,7 +28619,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ radialGradient(options: Optional): T; @@ -26385,7 +28649,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ motionPath(value: MotionPathOptions): T; @@ -26435,7 +28700,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ shadow(value: ShadowOptions | ShadowStyle): T; @@ -26453,7 +28719,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shadow(options: Optional): T; @@ -26504,7 +28771,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blendMode(value: BlendMode, type?: BlendApplyType): T; @@ -26535,13 +28803,14 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ blendMode(mode: Optional, type?: BlendApplyType): T; /** * Add a blendMode effect to the current component.Cannot be used together with the blendMode interface. - * + * * @param { BlendMode | Blender } effect - When the effect type is BlendMode type, define Different hybrid modes. * When the effect type is Blender type, Define the corresponding blending effect. * @param { BlendApplyType } [type] - Different blend apply type @@ -26549,7 +28818,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ advancedBlendMode(effect: BlendMode | Blender, type?: BlendApplyType): T; @@ -26567,7 +28837,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clip(value: boolean): T; @@ -26586,7 +28857,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clip(clip: Optional): T; @@ -26670,7 +28942,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clipShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; @@ -26687,7 +28960,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ clipShape(shape: Optional): T; @@ -26700,7 +28974,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mask(value: ProgressMask): T; @@ -26715,7 +28990,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mask(mask: Optional): T; @@ -26771,7 +29047,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maskShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; @@ -26786,7 +29063,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maskShape(shape: Optional): T; @@ -26797,8 +29075,9 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @test + * @arkts 1.1&1.2 */ key(value: string): T; @@ -26838,7 +29117,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): T; @@ -26867,7 +29147,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ geometryTransition(id: string): T; /** @@ -26889,23 +29170,11 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ geometryTransition(id: string, options?: GeometryTransitionOptions): T; - /** - * Tips control - * - * @param { TipsMessageType } message - * @param { TipsOptions } [options] - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ - bindTips(message: TipsMessageType, options?: TipsOptions): T; - /** * Popup control * @@ -26937,7 +29206,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): T; @@ -26971,7 +29241,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindMenu(content: Array | CustomBuilder, options?: MenuOptions): T; @@ -26996,7 +29267,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bindMenu(isShow: boolean, content: Array | CustomBuilder, options?: MenuOptions): T; @@ -27033,7 +29305,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): T; @@ -27053,7 +29326,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bindContextMenu(isShown: boolean, content: CustomBuilder, options?: ContextMenuOptions): T; @@ -27069,7 +29343,7 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27078,12 +29352,13 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContentCover(isShow: boolean, builder: CustomBuilder, type?: ModalTransition): T; /** - * Binds a modal page to the component, whose visibility is subject to the isShow settings. + * Bind content cover * * @param { boolean } isShow - true means display content, false means hide content. * @param { CustomBuilder } builder - the content to be displayed. @@ -27103,7 +29378,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindContentCover(isShow: boolean, builder: CustomBuilder, options?: ContentCoverOptions): T; @@ -27128,7 +29404,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): T; @@ -27168,7 +29445,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stateStyles(value: StateStyles): T; @@ -27188,7 +29466,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ restoreId(value: number): T; @@ -27232,7 +29511,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback): T; @@ -27247,7 +29527,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ onVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleAreaChangeCallback | undefined): void; @@ -27269,7 +29550,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sphericalEffect(value: number): T; @@ -27291,7 +29573,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sphericalEffect(effect: Optional): T; @@ -27308,7 +29591,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpEffect(value: number): T; @@ -27327,7 +29611,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpEffect(degree: Optional): T; @@ -27356,7 +29641,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelStretchEffect(options: PixelStretchEffectOptions): T; @@ -27386,7 +29672,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ pixelStretchEffect(options: Optional): T; @@ -27411,7 +29698,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardShortcut(value: string | FunctionKey, keys: Array, action?: () => void): T; @@ -27448,7 +29736,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityGroup(value: boolean): T; @@ -27473,7 +29762,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityGroup(isGroup: boolean, accessibilityOptions: AccessibilityOptions): T; @@ -27500,17 +29790,18 @@ declare class CommonMethod { * Sets the accessibility text. * When a component does not contain a text attribute, you can use this API to set an accessibility * text attribute, so that accessibility services can announce the specified content for the component. - * + * * @param { string } value - set accessibility text, default value is "". * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityText(value: string): T; - + /** * Sets accessibility next focus id * @param { string } nextId - set component next accessibility focus id @@ -27519,10 +29810,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityNextFocusId(nextId: string): T; - + /** * Sets the accessibility default foucs flag * @param { boolean } focus - if the component is accessibility default focus,focus set true @@ -27531,10 +29823,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDefaultFocus(focus: boolean): T; - + /** * Sets accessibility same page mode * @param { AccessibilitySamePageMode } pageMode - accessibility same page mode @@ -27543,22 +29836,11 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityUseSamePage(pageMode: AccessibilitySamePageMode): T; - /** - * Sets accessibilityScrollTriggerable - * @param { boolean } isTriggerable - set property of supporting scroll in accessibility - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - accessibilityScrollTriggerable(isTriggerable: boolean): T; - /** * Sets the accessibility text. *

NOTE @@ -27573,46 +29855,36 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityText(text: Resource): T; - - /** - * Sets accessibility role,role indicates the custom type of the component - * @param { AccessibilityRoleType } role - set accessibility component type - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - accessibilityRole(role: AccessibilityRoleType): T; /** - * Register accessibility focus callback,when the component is focused or out of focus,the callback will be executed - * @param { AccessibilityFocusCallback } callback - accessibility focus callback function + * Sets accessibility role,role indicates the custom type of the component + * @param { AccessibilityRoleType } role - set accessibility component type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - onAccessibilityFocus(callback: AccessibilityFocusCallback): T; + accessibilityRole(role: AccessibilityRoleType): T; /** - * Register accessibility action intercept callback, - * when accessibility action is to be executed,the callback will be executed - * @param { AccessibilityActionInterceptCallback } callback - accessibility action intercept callback function + * Register accessibility focus callback,when the component is focused or out of focus,the callback will be executed + * @param { AccessibilityFocusCallback } callback - accessibility focus callback function * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 20 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - onAccessibilityActionIntercept(callback: AccessibilityActionInterceptCallback): T; + onAccessibilityFocus(callback: AccessibilityFocusCallback): T; /** * Sets accessibilityTextHint @@ -27623,7 +29895,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityTextHint(value: string): T; @@ -27655,13 +29928,14 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDescription(value: string): T; /** * Sets accessibilityDescription - * + * * with support for resource references using Resource. * This property provides additional context or explanation for the component, * helping users understand the action or function it performs. @@ -27677,7 +29951,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityDescription(description: Resource): T; @@ -27725,7 +30000,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityLevel(value: string): T; @@ -27748,7 +30024,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityVirtualNode(builder: CustomBuilder): T; @@ -27761,7 +30038,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityChecked(isCheck: boolean): T; @@ -27774,7 +30052,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilitySelected(isSelect: boolean): T; @@ -27795,7 +30074,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ obscured(reasons: Array): T; @@ -27816,7 +30096,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reuseId(id: string): T; @@ -27828,7 +30109,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ reuse(options: ReuseOptions): T; @@ -27866,7 +30148,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderFit(fitMode: RenderFit): T; @@ -27883,7 +30166,8 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ renderFit(fitMode: Optional): T; @@ -27918,7 +30202,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gestureModifier(modifier: GestureModifier): T; @@ -27929,7 +30214,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBrightness(params: BackgroundBrightnessOptions): T; @@ -27942,7 +30228,8 @@ declare class CommonMethod { * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBrightness(options: Optional): T; @@ -27963,7 +30250,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): T; @@ -27975,7 +30263,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback): T; @@ -27996,8 +30285,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback, exposeInnerGesture: boolean): T; @@ -28009,7 +30298,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shouldBuiltInRecognizerParallelWith(callback: ShouldBuiltInRecognizerParallelWithCallback): T; @@ -28032,7 +30322,8 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ monopolizeEvents(monopolize: boolean): T; @@ -28044,10 +30335,26 @@ declare class CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTouchIntercept(callback: Callback): T; + /** + * Register one callback which will be executed when all gesture recognizers are collected done, this happens + * when user touchs down, the system do hit test process and collect gesture recognizers base on the touch + * position, after this, before handling any move events, the component can use this interface to know which + * gesture recognizers will participate in the recognition and competing with each other. + * + * @param { TouchTestDoneCallback } callback - A callback instance used when all gesture recognizers are collected. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onTouchTestDone(callback: TouchTestDoneCallback): T; + /** * This callback is triggered when the component size changes due to layout updates. * This event is not triggered for render attribute changes caused by re-rendering. @@ -28058,11 +30365,88 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSizeChange(event: SizeChangeCallback): T; /** + * Tips control + * + * @param { TipsMessageType } message + * @param { TipsOptions } [options] + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + bindTips(message: TipsMessageType, options?: TipsOptions): T; + + /** + * Trigger a hover move event. + * + * @param { Callback } event + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 + */ + onHoverMove(event: Callback): T; + + /** + * Sets accessibilityScrollTriggerable + * @param { boolean } isTriggerable - set property of supporting scroll in accessibility + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + accessibilityScrollTriggerable(isTriggerable: boolean): T; + + /** + * Sets the background effect of the component, including the blur radius, brightness, + * saturation, and color. Compared to backgroundEffect11+, + * this API supports the **undefined** type for the **options** parameter. + * + * @param { Optional } options - Background effect, including saturation, + * brightness, and color. + *
If **options** is **undefined**, the background reverts to its default state with no effect. + * @param { SystemAdaptiveOptions } [ sysOptions ] - System adaptive adjustment options. + *
Default value: **{ disableSystemAdaptation: false }**. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + backgroundEffect(options: Optional): T; + + /** + * Adds the content blurring effect for the current component. The input parameter is the blurring radius. + * The larger the blurring radius, the more blurring the content. + * If the value is 0, the content blurring effect is not blurring. + * + * @param { Optional } blurRadius - value indicates radius of backdrop blur. + * @param { BlurOptions } [options] - options indicates blur options. + * @param { SystemAdaptiveOptions } [sysOptions] - system adaptive options. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + blur(blurRadius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; + + /** * Accessibility focus draw level, and the default value is FocusDrawLevel.SELF. * * @param { FocusDrawLevel } drawLevel - indicates accessibility focus draw level. @@ -28071,24 +30455,105 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityFocusDrawLevel(drawLevel: FocusDrawLevel): T; /** - * Register one callback which will be executed when all gesture recognizers are collected done, this happens - * when user touchs down, the system do hit test process and collect gesture recognizers base on the touch - * position, after this, before handling any move events, the component can use this interface to know which - * gesture recognizers will participate in the recognition and competing with each other. + * Enables the component as a drag-and-drop target with spring loading functionality. * - * @param { TouchTestDoneCallback } callback - A callback instance used when all gesture recognizers are collected. + * When a dragged object hovers over the target, it triggers a callback notification. Spring Loading is an enhanced + * feature for drag-and-drop operations, allowing users to automatically trigger view transitions during dragging + * by hovering (hover) without needing to use another hand. + * This feature is primarily designed to enhance the smoothness and efficiency of drag-and-drop operations. Below are + * some common scenarios suitable for supporting this feature: + * - In a file manager, when dragging a file and hovering over a folder, the folder is automatically opened. + * - On a desktop launcher, when dragging a file and hovering over an application icon, the application is + * automatically opened. + * + * Please note: + * 1. Registering spring-loaded or drag-and-drop events (onDragEnter/Move/Leave/Drop) on a component makes it a + * drag-and-drop target. Only one target can be the responder at the same time when user drags and hovers on, and + * child components always have higher priority. + * 2. Once a complete spring loading is triggered on a component, new spring loading detection will only occur after the + * dragged object leaves and re-enters the component's range. + * + * @param { Callback | null } callback Registers the callback for spring loading response, or + * sets it to null to disable the support for spring loading. + * @param { DragSpringLoadingConfiguration } [configuration] The initialized spring loading configuration which is + * only used when the entire spring detecting. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + onDragSpringLoading(callback: Callback | null, configuration?: DragSpringLoadingConfiguration): T; + + /** + * Background blur style. + * + * @param { Optional } style - Settings of the background blur style + *
including the blur radius, mask color, mask opacity, saturation, and brightness. + * @param { BackgroundBlurStyleOptions } [options] - Background blur options. + * @param { SystemAdaptiveOptions } [sysOptions] - System adaptive options. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backgroundBlurStyle(style: Optional, options?: BackgroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; + + /** + * Adds the background blur effect for the current component. The input parameter is the blur radius. + * The larger the blur radius, the more blurred the background. If the value is 0, the background blur is not blurred. + * + * @param { Optional } radius - radius indicates radius of backdrop blur. + * @param { BlurOptions } [options] - options indicates the backdrop blur options. + * @param { SystemAdaptiveOptions } [sysOptions] - system adaptive options. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + backdropBlur(radius: Optional, options?: BlurOptions, sysOptions?: SystemAdaptiveOptions): T; + + /** + * Foreground blur style. + * blurStyle:Blur style type. + * sysOptions: system adaptive options. + * + * @param { Optional } style + * @param { ForegroundBlurStyleOptions } [options] + * @param { SystemAdaptiveOptions } [sysOptions] + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + foregroundBlurStyle(style: Optional, options?: ForegroundBlurStyleOptions, sysOptions?: SystemAdaptiveOptions): T; + + /** + * Register accessibility action intercept callback, + * when accessibility action is to be executed,the callback will be executed + * @param { AccessibilityActionInterceptCallback } callback - accessibility action intercept callback function * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 20 */ - onTouchTestDone(callback: TouchTestDoneCallback): T; + onAccessibilityActionIntercept(callback: AccessibilityActionInterceptCallback): T; + } /** @@ -28127,6 +30592,18 @@ declare class CommonMethod { */ declare class CommonAttribute extends CommonMethod {} +/** + * CommonAttribute for ide. + * + * @typedef { CommonMethod } CommonAttribute + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type CommonAttribute = CommonMethod /** * CommonInterface for ide. * @@ -28171,7 +30648,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -28188,7 +30665,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28311,7 +30788,8 @@ declare type CustomBuilder = (() => any) | void; * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OverlayOptions { /** @@ -28347,10 +30825,11 @@ declare interface OverlayOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ align?: Alignment; - + /** * Defines offset type. * @@ -28384,7 +30863,8 @@ declare interface OverlayOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: OverlayOffset; } @@ -28397,7 +30877,8 @@ declare interface OverlayOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OverlayOffset { /** @@ -28432,7 +30913,8 @@ declare interface OverlayOffset { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; /** @@ -28467,7 +30949,8 @@ declare interface OverlayOffset { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; } @@ -28482,7 +30965,8 @@ declare interface OverlayOffset { * @typedef { [ number, number ] } FractionStop * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type FractionStop = [ number, number ]; @@ -28518,7 +31002,8 @@ declare type FractionStop = [ number, number ]; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonShapeMethod extends CommonMethod { /** @@ -28534,7 +31019,8 @@ declare class CommonShapeMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @form - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -28582,7 +31068,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stroke(value: ResourceColor): T; @@ -28630,7 +31117,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(value: ResourceColor): T; @@ -28682,7 +31170,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeDashOffset(value: number | string): T; @@ -28722,7 +31211,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineCap(value: LineCapStyle): T; @@ -28766,7 +31256,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineJoin(value: LineJoinStyle): T; @@ -28806,7 +31297,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeMiterLimit(value: number | string): T; @@ -28858,7 +31350,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeOpacity(value: number | string | Resource): T; @@ -28910,7 +31403,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillOpacity(value: number | string | Resource): T; @@ -28970,7 +31464,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: Length): T; @@ -29022,7 +31517,8 @@ declare class CommonShapeMethod extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ antiAlias(value: boolean): T; @@ -29077,6 +31573,20 @@ declare class CommonShapeMethod extends CommonMethod { * @since 11 */ strokeDashArray(value: Array): T; + + /** + * Sets the gap for the border. + * + * @param { Array } value + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeDashArray(value: Array): T; } /** @@ -29223,7 +31733,8 @@ declare interface LinearGradient { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PixelRoundPolicy { /** @@ -29235,7 +31746,8 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: PixelRoundCalcPolicy; @@ -29248,7 +31760,8 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: PixelRoundCalcPolicy; @@ -29261,7 +31774,8 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: PixelRoundCalcPolicy; @@ -29274,7 +31788,8 @@ declare interface PixelRoundPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: PixelRoundCalcPolicy; } @@ -29285,7 +31800,8 @@ declare interface PixelRoundPolicy { * @interface LinearGradientBlurOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearGradientBlurOptions { /** @@ -29294,7 +31810,8 @@ declare interface LinearGradientBlurOptions { * @type { FractionStop[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fractionStops: FractionStop[]; /** @@ -29303,19 +31820,21 @@ declare interface LinearGradientBlurOptions { * @type { GradientDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction: GradientDirection; } /** * Define motion blur anchor coordinates. - * + * * @interface MotionBlurAnchor * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionBlurAnchor { /** @@ -29324,7 +31843,8 @@ declare interface MotionBlurAnchor { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; /** @@ -29333,19 +31853,21 @@ declare interface MotionBlurAnchor { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } /** * Define motion blur options. - * + * * @interface MotionBlurOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MotionBlurOptions { /** @@ -29354,16 +31876,18 @@ declare interface MotionBlurOptions { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; /** * Define motion blur anchor coordinates. - * + * * @type { MotionBlurAnchor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ anchor: MotionBlurAnchor; } @@ -29534,7 +32058,7 @@ declare interface LayoutChild { } /** - * Sub component layout info. + * Custom component layout info. * * @extends SizeResult * @interface GeometryInfo @@ -29543,18 +32067,19 @@ declare interface LayoutChild { * @since 10 */ /** - * Sub component layout info. + * Custom component layout info. * * @extends SizeResult * @interface GeometryInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GeometryInfo extends SizeResult { /** - * Sub component borderWidth info. + * Custom component borderWidth info. * * @type { EdgeWidth } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29562,18 +32087,19 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Sub component borderWidth info. + * Custom component borderWidth info. * * @type { EdgeWidth } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth: EdgeWidth; /** - * Sub component margin info. + * Custom component margin info. * * @type { Margin } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29581,18 +32107,19 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Sub component margin info. + * Custom component margin info. * * @type { Margin } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin: Margin, /** - * Sub component padding info. + * Custom component padding info. * * @type { Padding } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29600,13 +32127,14 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Sub component padding info. + * Custom component padding info. * * @type { Padding } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ padding: Padding, } @@ -29620,17 +32148,18 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Provides the child component layout information. + * Provides the sub component layout information. * * @interface Layoutable * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Layoutable { /** - * Measurement result of the child component. + * Measurement result of the sub component. * * @type { MeasureResult } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29638,24 +32167,26 @@ declare interface Layoutable { * @since 10 */ /** - * Measurement result of the child component. + * Measurement result of the sub component. * * @type { MeasureResult } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measureResult: MeasureResult, /** - * Unique ID of the child component. + * Unique ID of the sub component. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId?: number; @@ -29668,46 +32199,50 @@ declare interface Layoutable { * @since 10 */ /** - * Applies the specified position information to the child component. + * Applies the specified position information to the sub component. * * @param { Position } position * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layout(position: Position): void, /** - * Obtains the margin of the child component. + * Obtains the margin of the sub component. * * @returns { DirectionalEdgesT } the margin of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMargin() : DirectionalEdgesT, /** * Call this method to get the padding of sub component. * - * @returns { DirectionalEdgesT } Padding of the child component, unit is vp. + * @returns { DirectionalEdgesT } Padding of the sub component, unit is vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPadding() : DirectionalEdgesT, - + /** - * Obtains the border width of the child component. + * Obtains the border width of the sub component. * * @returns { DirectionalEdgesT } the borderWidth of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBorderWidth() : DirectionalEdgesT, } @@ -29727,17 +32262,19 @@ declare interface Layoutable { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Measurable { /** - * Unique ID that the system assigns to the child component. + * Unique ID that the system assigns to the sub component. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId?: number; @@ -29751,53 +32288,57 @@ declare interface Measurable { * @since 10 */ /** - * Applies the size constraint to the child component. + * Applies the size constraint to the sub component. * * @param { ConstraintSizeOptions } constraint * @returns { MeasureResult } Provides the measurement result of the component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ measure(constraint: ConstraintSizeOptions) : MeasureResult, /** - * Obtains the margin of the child component. + * Obtains the margin of the sub component. * - * @returns { DirectionalEdgesT } Margin of the child component, unit is vp. + * @returns { DirectionalEdgesT } Margin of the sub component, unit is vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMargin() : DirectionalEdgesT, /** - * Obtains the padding of the child component. + * Obtains the padding of the sub component. * * @returns { DirectionalEdgesT } the padding of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPadding() : DirectionalEdgesT, /** - * Obtains the border width of the child component. + * Obtains the border width of the sub component. * - * @returns { DirectionalEdgesT } Border width of the child component, unit is vp. + * @returns { DirectionalEdgesT } Border width of the sub component, unit is vp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getBorderWidth() : DirectionalEdgesT, } /** - * Sub component SizeResult info. + * Component SizeResult info. * * @interface SizeResult * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29811,7 +32352,8 @@ declare interface Measurable { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SizeResult { /** @@ -29829,7 +32371,8 @@ declare interface SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: number, @@ -29848,13 +32391,14 @@ declare interface SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: number, } /** - * Sub component MeasureResult info. + * Component MeasureResult info. * * @extends SizeResult * @interface MeasureResult @@ -29870,10 +32414,11 @@ declare interface SizeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MeasureResult extends SizeResult { - + } /** @@ -29894,6 +32439,30 @@ declare interface MeasureResult extends SizeResult { */ declare type NavDestinationInfo = import('../api/@ohos.arkui.observer').default.NavDestinationInfo; + +/** + * The navigation destination information. + * + * @typedef {uiObserver.NavDestinationInfo} NavDestinationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type NavDestinationInfo = uiObserver.NavDestinationInfo; +/** + * The navigation information. + * + * @typedef { uiObserver.NavigationInfo } NavigationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type NavigationInfo = uiObserver.NavigationInfo; + /** * The navigation information. * @@ -29916,6 +32485,18 @@ declare type NavigationInfo = import('../api/@ohos.arkui.observer').default.Navi */ declare type RouterPageInfo = import('../api/@ohos.arkui.observer').default.RouterPageInfo; +/** + * The router page information. + * + * @typedef {uiObserver.RouterPageInfo} RouterPageInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type RouterPageInfo = uiObserver.RouterPageInfo; + /** * UIContext * @@ -29956,6 +32537,18 @@ declare type DrawContext = import('../api/arkui/Graphics').DrawContext; */ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.VisualEffect; +/** + * VisualEffect + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.VisualEffect } VisualEffect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type VisualEffect = uiEffect.VisualEffect; + /** * Filter @@ -29968,6 +32561,18 @@ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.Vis */ declare type Filter = import('../api/@ohos.graphics.uiEffect').default.Filter; +/** + * Filter + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.Filter } Filter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Filter = uiEffect.Filter; + /** * Blender * @@ -29979,6 +32584,18 @@ declare type Filter = import('../api/@ohos.graphics.uiEffect').default.Filter; */ declare type Blender = import('../api/@ohos.graphics.uiEffect').default.Blender; +/** + * Blender + * + * @typedef { import('../api/@ohos.graphics.uiEffect').default.Blender } Blender + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @form + * @since 20 + * @arkts 1.2 + */ +declare type Blender = uiEffect.Blender; + /** * ComponentContent. * @@ -30011,6 +32628,17 @@ declare type Theme = import('../api/@ohos.arkui.theme').Theme; */ declare type PromptActionDialogController = import('../api/@ohos.promptAction').promptAction.DialogController; +/** + * Import the DialogController type from promptAction. + * + * @typedef { promptAction.DialogController } PromptActionDialogController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PromptActionDialogController = promptAction.DialogController; + /** * Custom Component * @@ -30128,7 +32756,7 @@ declare class CustomComponentV2 extends BaseCustomComponent { /** * Invoked when a reusable custom component managed by state management V2 * is taken from the reuse pool and reinserted into the node tree. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30318,7 +32946,7 @@ declare class BaseCustomComponent extends CommonAttribute { /** * The onWillApplyTheme function is a custom hook to get active theme object from the context - * + * * @param { Theme } theme - Custom theme init params. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30327,7 +32955,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ /** * The onWillApplyTheme function is a custom hook to get active theme object from the context, it is migrated from class CustomComponent. - * + * * @param { Theme } theme - Custom theme init params. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30408,7 +33036,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is displayed, for example, during page redirection. * When the application is switched to the foreground. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -30416,7 +33044,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is displayed, for example, during page redirection. * When the application is switched to the foreground. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -30425,7 +33053,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is displayed, for example, during page redirection. * When the application is switched to the foreground. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30435,7 +33063,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is displayed, for example, during page redirection. * When the application is switched to the foreground. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30447,7 +33075,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is hidden, for example, during page redirection. * When the application is switched to the background. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -30455,7 +33083,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is hidden, for example, during page redirection. * When the application is switched to the background. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -30464,7 +33092,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is hidden, for example, during page redirection. * When the application is switched to the background. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30474,7 +33102,7 @@ declare class BaseCustomComponent extends CommonAttribute { * Invoked each time the page is hidden, for example, during page redirection. * When the application is switched to the background. * It works only for the custom components decorated by **@Entry**. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30546,10 +33174,12 @@ declare class BaseCustomComponent extends CommonAttribute { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFormRecover?(statusData: string): void; + /** * onBackPress Method * @@ -30557,7 +33187,7 @@ declare class BaseCustomComponent extends CommonAttribute { * It works only for the custom components decorated by @Entry. * The value **true** means that the page executes its own return logic. * And **false** (default) means that the default return logic is used. - * + * * @returns { void | boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -30569,7 +33199,7 @@ declare class BaseCustomComponent extends CommonAttribute { * It works only for the custom components decorated by @Entry. * The value **true** means that the page executes its own return logic. * And **false** (default) means that the default return logic is used. - * + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30584,7 +33214,7 @@ declare class BaseCustomComponent extends CommonAttribute { * It works only for the custom components decorated by @Entry. * The value **true** means that the page executes its own return logic. * And **false** (default) means that the default return logic is used. - * + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30598,7 +33228,7 @@ declare class BaseCustomComponent extends CommonAttribute { * It works only for the custom components decorated by @Entry. * The value **true** means that the page executes its own return logic. * And **false** (default) means that the default return logic is used. - * + * * @returns { void | boolean } true means that the page itself processes the return logic. * false means that the default return logic is used. * If no value is returned, the default return logic is used. @@ -30640,7 +33270,8 @@ declare class BaseCustomComponent extends CommonAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ pageTransition?(): void; @@ -30725,7 +33356,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 18 */ queryNavDestinationInfo(): NavDestinationInfo | undefined; - + /** * Queries the information about the nearest **NavDestination** component * in the navigation stack for a custom component. @@ -30741,7 +33372,7 @@ declare class BaseCustomComponent extends CommonAttribute { /** * Queries the **Navigation** information of this custom component. - * + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30750,7 +33381,7 @@ declare class BaseCustomComponent extends CommonAttribute { */ /** * Queries the **Navigation** information of this custom component. - * + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30876,7 +33507,8 @@ declare class View { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RectResult { /** @@ -30893,7 +33525,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -30911,7 +33544,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; @@ -30929,7 +33563,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -30947,7 +33582,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -30967,7 +33603,8 @@ declare interface RectResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CaretOffset { /** @@ -30983,7 +33620,8 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -31000,10 +33638,11 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; - + /** * Get the y of the relative position. * @@ -31017,7 +33656,8 @@ declare interface CaretOffset { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } @@ -31029,7 +33669,8 @@ declare interface CaretOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextContentControllerOptions { /** @@ -31039,7 +33680,8 @@ declare interface TextContentControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; } @@ -31057,7 +33699,8 @@ declare interface TextContentControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare abstract class TextContentControllerBase { /** @@ -31079,12 +33722,13 @@ declare abstract class TextContentControllerBase { * the return value contains the position information relative to the component. *
The location information in the return value is the location of the caret relative to the editable component. *

- * + * * @returns { CaretOffset } index and relative position of the CaretOffset. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset() : CaretOffset; @@ -31111,7 +33755,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTextContentRect() : RectResult; @@ -31126,12 +33771,13 @@ declare abstract class TextContentControllerBase { /** * Get the lines number of the text content. * The getTextContentLineCount type is used to obtain the number of lines of the edited text. - * + * * @returns { number } Text content line count * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTextContentLineCount() : number; @@ -31144,7 +33790,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ addText(text: string, textOperationOptions?: TextContentControllerOptions): number; @@ -31155,7 +33802,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deleteText(range?: TextRange): void; @@ -31166,7 +33814,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): TextRange; @@ -31175,7 +33824,8 @@ declare abstract class TextContentControllerBase { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ clearPreviewText(): void; @@ -31187,7 +33837,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getText(range?: TextRange): string; } @@ -31199,7 +33850,8 @@ declare abstract class TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContentClipMode { /** @@ -31208,7 +33860,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_ONLY = 0, @@ -31218,7 +33871,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BOUNDARY = 1, @@ -31228,7 +33882,8 @@ declare enum ContentClipMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SAFE_AREA = 2, } @@ -31250,7 +33905,8 @@ declare enum ContentClipMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollableCommonMethod extends CommonMethod { /** @@ -31262,7 +33918,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBar(barState: BarState): T; @@ -31276,7 +33933,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarColor(color: Color | number | string): T; @@ -31291,7 +33949,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarWidth(value: number | string): T; @@ -31320,7 +33979,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect(edgeEffect: EdgeEffect, options?: EdgeEffectOptions): T; @@ -31333,19 +33993,21 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdge(enabled: Optional, options?: FadingEdgeOptions): T; /** * Sets the nested scrolling options. * - * @param { NestedScrollOptions } value - Nested scrolling options. - * @returns { T } + * @param { NestedScrollOptions } value - options for nested scrolling. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: NestedScrollOptions): T; @@ -31353,11 +34015,12 @@ declare class ScrollableCommonMethod extends CommonMethod { * Sets whether to support scroll gestures. * * @param { boolean } value - Whether to support scroll gestures.
Default value: true - * @returns { T } + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableScrollInteraction(value: boolean): T; @@ -31365,11 +34028,12 @@ declare class ScrollableCommonMethod extends CommonMethod { * Sets the friction coefficient. * * @param { number | Resource } value - Friction coefficient. - * @returns { T } + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ friction(value: number | Resource): T; @@ -31434,7 +34098,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onReachStart(event: () => void): T; @@ -31446,7 +34111,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onReachEnd(event: () => void): T; @@ -31458,7 +34124,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStart(event: () => void): T; @@ -31470,7 +34137,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop(event: () => void): T; @@ -31485,19 +34153,21 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flingSpeedLimit(speedLimit: number): T; /** * Sets the content clipping area for this scrollable component. - * + * * @param { ContentClipMode | RectShape } clip - A value from enum ContentClipMode or a customized clip rect. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ clipContent(clip: ContentClipMode | RectShape): T; @@ -31509,20 +34179,22 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): T; - + /** * Sets whether to enable the back-to-top feature for a scrollable component when the status bar is touched. - * + * * @param { boolean } backToTop - Whether to enable the back-to-top feature for a scrollable component when the status bar is touched. *
Default value: false * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ backToTop(backToTop: boolean): T; } @@ -31532,7 +34204,8 @@ declare class ScrollableCommonMethod extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollResult { /** @@ -31541,7 +34214,8 @@ declare class ScrollResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetRemain: number; } @@ -31553,16 +34227,34 @@ declare class ScrollResult { * @param { number } scrollOffset - offset this frame will scroll, which may or may not be reached. * @param { ScrollState } scrollState - current scroll state. * @param { ScrollSource } scrollSource - source of current scroll. - * @returns { void | ScrollResult } the remain offset for the scrollable, + * @returns { void | ScrollResult } the remain offset for the scrollable, * same as scrollOffset when no ScrollResult is returned. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ -declare type OnWillScrollCallback = +declare type OnWillScrollCallback = (scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | ScrollResult; +/** + * Called before scroll to allow developer to control real offset the Scrollable can scroll. + * + * @typedef { function } OnWillScrollCallback + * @param { number } scrollOffset - offset this frame will scroll, which may or may not be reached. + * @param { ScrollState } scrollState - current scroll state. + * @param { ScrollSource } scrollSource - source of current scroll. + * @returns { void | ScrollResult } the remain offset for the scrollable, + * same as scrollOffset when no ScrollResult is returned. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type OnWillScrollCallback = +(scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | ScrollResult; + /** * On scroll callback using in scrollable onDidScroll. * @@ -31573,10 +34265,25 @@ declare type OnWillScrollCallback = * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollCallback = (scrollOffset: number, scrollState: ScrollState) => void; +/** + * Defines the callback type used in onItemDragStart. + * + * @typedef { function } OnItemDragStartCallback + * @param { ItemDragInfo } event - Information about the dragged item. + * @param { number } itemIndex - The index number of the dragged item. + * @returns {CustomBuilder | undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type OnItemDragStartCallback = (event: ItemDragInfo, itemIndex: number) => CustomBuilder | undefined; + /** * On scroll callback using in scrollable onWillStopDragging. * @@ -31599,7 +34306,8 @@ declare type OnWillStopDraggingCallback = (velocity: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnMoveHandler = (from: number, to: number) => void; @@ -31611,6 +34319,7 @@ declare type OnMoveHandler = (from: number, to: number) => void; * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface ItemDragEventHandler { /** @@ -31621,6 +34330,7 @@ declare interface ItemDragEventHandler { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -31632,17 +34342,19 @@ declare interface ItemDragEventHandler { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onDragStart?: Callback; /** * This callback is triggered when an item is moved through other items. * - * @type { ?Callback } + * @type { ?OnMoveHandler } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onMoveThrough?: OnMoveHandler; @@ -31654,8 +34366,47 @@ declare interface ItemDragEventHandler { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 + */ + onDrop?: Callback; +} + +/** + * Define DynamicNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare class DynamicNode { + /** + * Invoked when data is moved during drag and drop sorting. + * This callback is only applicable in a List component. + * where each ForEach iteration generates a ListItem component. + * It allows you to define custom drag actions and handle various drag events. + * + * @param { Optional } handler + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onMove(handler: Optional): T; + + /** + * Set the move action. + * + * @param { Optional } handler + * @param { ItemDragEventHandler } eventHandler + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 */ - onDrop?: Callback; + onMove(handler: Optional, eventHandler: ItemDragEventHandler): T; } /** @@ -31664,39 +34415,36 @@ declare interface ItemDragEventHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ -declare class DynamicNode { +declare interface DynamicNode { /** - * Invoked when data is moved during drag and drop sorting. - * This callback is only applicable in a List component. - * where each ForEach iteration generates a ListItem component. - * It allows you to define custom drag actions and handle various drag events. + * Set the move action. * * @param { Optional } handler - * @returns { T } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 */ - onMove(handler: Optional): T; + onMove(handler: Optional): this; /** - * Invoked when data is moved during drag and drop sorting. - * This callback is only applicable in a List component. - * where each ForEach iteration generates a ListItem component. - * It allows you to define custom drag actions and handle various drag events. + * Set the move action. * * @param { Optional } handler * @param { ItemDragEventHandler } eventHandler - * @returns { T } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ - onMove(handler: Optional, eventHandler: ItemDragEventHandler): T; + onMove(handler: Optional, eventHandler: ItemDragEventHandler): this; } /** @@ -31714,7 +34462,8 @@ declare class DynamicNode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EdgeEffectOptions { /** @@ -31732,7 +34481,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alwaysEnabled: boolean; @@ -31743,7 +34493,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ effectEdge?: number; } @@ -31755,7 +34506,8 @@ declare interface EdgeEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EffectEdge { @@ -31765,7 +34517,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ START = 1, @@ -31775,7 +34528,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2, } @@ -31786,7 +34540,8 @@ declare enum EffectEdge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ChildrenMainSize { /** @@ -31794,14 +34549,15 @@ declare class ChildrenMainSize { * * @param { number } childDefaultSize - default main size, in vp. If the main axis is vertical, it indicates height. * If the main axis is horizontal, it indicates width. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(childDefaultSize: number); @@ -31810,14 +34566,15 @@ declare class ChildrenMainSize { * * @param { number } value - default main size, in vp. If the main axis is vertical, it indicates height. * If the main axis is horizontal, it indicates width. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ set childDefaultSize(value: number); @@ -31829,7 +34586,8 @@ declare class ChildrenMainSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ get childDefaultSize(): number; @@ -31839,17 +34597,18 @@ declare class ChildrenMainSize { * @param { number } start - Zero-based index at which to start changing the children main size. * @param { number } [deleteCount] - Indicating the number of children main size to remove from start. * @param { Array } [childrenSize] - Add the new children main size, beginning from start. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example splice(1, 0, [100]), Insert a child after first child, the child's main size is 100vp. * splice(1, 1), Delete the second child. * splice(1, 2, [100, 100]), Change the main size of the second and third children to 100vp. + * @arkts 1.1&1.2 */ splice(start: number, deleteCount?: number, childrenSize?: Array): void; @@ -31858,14 +34617,15 @@ declare class ChildrenMainSize { * * @param { number } index - index of child to be updated. * @param { number } childSize - new section options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ update(index: number, childSize: number): void; } @@ -31876,7 +34636,8 @@ declare class ChildrenMainSize { * @interface BackgroundBrightnessOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BackgroundBrightnessOptions { @@ -31887,7 +34648,8 @@ declare interface BackgroundBrightnessOptions { * @type { number } - The default value is 0.0, value range: (0.0, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rate: number; @@ -31897,7 +34659,8 @@ declare interface BackgroundBrightnessOptions { * @type { number } - The default value is 0.0, value range: [-1.0, 1.0]. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lightUpDegree: number; } @@ -31908,7 +34671,8 @@ declare interface BackgroundBrightnessOptions { * @interface PointLightStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PointLightStyle { /** @@ -31918,7 +34682,8 @@ declare interface PointLightStyle { * @default undefined * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lightSource?: LightSource; /** @@ -31928,7 +34693,8 @@ declare interface PointLightStyle { * @default IlluminatedType.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ illuminated?: IlluminatedType; /** @@ -31938,7 +34704,8 @@ declare interface PointLightStyle { * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bloom?: number; } @@ -31949,7 +34716,8 @@ declare interface PointLightStyle { * @interface LightSource * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LightSource { /** @@ -31958,7 +34726,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionX: Dimension; /** @@ -31967,7 +34736,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionY: Dimension; /** @@ -31976,7 +34746,8 @@ declare interface LightSource { * @type { Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ positionZ: Dimension; /** @@ -31985,7 +34756,8 @@ declare interface LightSource { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ intensity: number; /** @@ -31994,7 +34766,8 @@ declare interface LightSource { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; } @@ -32021,6 +34794,17 @@ declare interface LightSource { * @since 12 */ declare function wrapBuilder(builder: (...args: Args) => void): WrappedBuilder; +/** + * Defining wrapBuilder function. + * @param { function } builder + * @returns { WrappedBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare function wrapBuilder>(builder: (args: Args) => void): WrappedBuilder; /** * The WrappedBuilder object is also a template class. @@ -32070,6 +34854,39 @@ declare class WrappedBuilder { } + +/** + * Defines the WrappedBuilder class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class WrappedBuilder> { + + /** + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + builder: (args: Args) => void; + + /** + * @param { function } builder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(builder: (args: Args) => void); +} + + /** * Defines the overall animation parameters of the keyframe animation. * @@ -32085,7 +34902,8 @@ declare class WrappedBuilder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyframeAnimateParam { /** @@ -32105,7 +34923,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -32126,7 +34945,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; @@ -32145,7 +34965,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: () => void; @@ -32153,10 +34974,12 @@ declare interface KeyframeAnimateParam { * Indicates expectedFrameRateRange of keyframe animation. * * @type { ?ExpectedFrameRateRange } + * @default { min: 0, expected: 0, max: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ expectedFrameRateRange?: ExpectedFrameRateRange; } @@ -32176,7 +34999,8 @@ declare interface KeyframeAnimateParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyframeState { /** @@ -32194,7 +35018,8 @@ declare interface KeyframeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration: number; @@ -32202,6 +35027,7 @@ declare interface KeyframeState { * Animation curve of this keyframe. * * @type { ?(Curve | string | ICurve) } + * @default Curve.EaseInOut * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 @@ -32210,10 +35036,12 @@ declare interface KeyframeState { * Animation curve of this keyframe. * * @type { ?(Curve | string | ICurve) } + * @default Curve.EaseInOut * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; @@ -32232,7 +35060,8 @@ declare interface KeyframeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ event: () => void; } @@ -32261,6 +35090,20 @@ declare interface Callback { (data: T): V; } +/** + * Defines the callback + * + * @typedef { function } Callback + * @param { T } data + * @returns { V } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type Callback = (data: T) => V; + /** * Defines the callback type used in hover events. * The value of isHover indicates whether the mouse is hovering over the component. @@ -32272,9 +35115,10 @@ declare interface Callback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void +declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void; /** * Defines the callback type used in accessibility hover events. @@ -32287,9 +35131,10 @@ declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void +declare type AccessibilityCallback = (isHover: boolean, event: AccessibilityHoverEvent) => void; /** * Defines the callback type used in accessibility hover transparent event. @@ -32310,7 +35155,8 @@ declare type AccessibilityTransparentCallback = (event: TouchEvent) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VisibleAreaEventOptions { /** @@ -32320,7 +35166,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ratios: Array; @@ -32332,7 +35179,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ expectedUpdateInterval?: number; } @@ -32359,7 +35207,8 @@ declare interface VisibleAreaEventOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare type VisibleAreaChangeCallback = (isExpanding: boolean, currentRatio: number) => void; @@ -32370,7 +35219,8 @@ declare type VisibleAreaChangeCallback = (isExpanding: boolean, currentRatio: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UICommonEvent { /** @@ -32380,7 +35230,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnClick(callback: Callback | undefined): void; @@ -32391,7 +35242,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnTouch(callback: Callback | undefined): void; @@ -32402,18 +35254,20 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnAppear(callback: Callback | undefined): void; /** * Set or reset the callback is triggered when component uninstallation disappears. - * + * * @param { Callback | undefined } callback - The callback will be triggered when component uninstallation disappears. If set undefined will reset the target callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnDisappear(callback: Callback | undefined): void; @@ -32425,7 +35279,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnKeyEvent(callback: Callback | undefined): void; @@ -32436,7 +35291,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnFocus(callback: Callback | undefined): void; @@ -32447,18 +35303,20 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnBlur(callback: Callback | undefined): void; /** * Set or reset the callback which is triggered when has a hover event. - * + * * @param { HoverCallback | undefined } callback - The callback will be triggered when has a hover event. If set undefined will reset the target callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnHover(callback: HoverCallback | undefined): void; @@ -32469,7 +35327,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnMouse(callback: Callback | undefined): void; @@ -32480,7 +35339,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnSizeChange(callback: SizeChangeCallback | undefined): void; @@ -32493,7 +35353,8 @@ declare interface UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setOnVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleAreaChangeCallback | undefined): void; } @@ -32575,7 +35436,8 @@ declare interface UIScrollableCommonEvent extends UICommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UIGestureEvent { /** @@ -32591,6 +35453,20 @@ declare interface UIGestureEvent { */ addGesture(gesture: GestureHandler, priority?: GesturePriority, mask?: GestureMask): void; + /** + * Add a gesture bound to the component. + * + * @param { GestureHandler } gesture - gesture indicates the gesture bound to a component. + * @param { GesturePriority } priority - priority indicates the gesture's priority. + * @param { GestureMask } mask - mask indicates the gesture's GestureMask value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + addGesture(gesture: GestureHandler, priority?: GesturePriority, mask?: GestureMask): void; + /** * Adds a gesture that can be recognized at once by the component and its child component. * @@ -32602,6 +35478,18 @@ declare interface UIGestureEvent { * @since 12 */ addParallelGesture(gesture: GestureHandler, mask?: GestureMask): void; + /** + * Add a parallel gesture bound to the component. + * + * @param { GestureHandler } gesture - gesture indicates the gesture bound to a component. + * @param { GestureMask } mask - mask indicates the gesture's GestureMask value. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + addParallelGesture(gesture: GestureHandler, mask?: GestureMask): void; /** * Remove a gesture from a component that has been bound with a specific tag through a modifier. @@ -32610,7 +35498,8 @@ declare interface UIGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeGestureByTag(tag: string): void; @@ -32620,29 +35509,32 @@ declare interface UIGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearGestures(): void; } /** * Defines the gesture modifier. - * + * * @interface GestureModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureModifier { /** * Defines the gesture update function. - * + * * @param { UIGestureEvent } event * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ applyGesture(event: UIGestureEvent): void; } @@ -32654,7 +35546,8 @@ declare interface GestureModifier { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionOptions { /** @@ -32664,7 +35557,8 @@ declare interface SelectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuPolicy?: MenuPolicy; } @@ -32676,7 +35570,8 @@ declare interface SelectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusMovement { /** @@ -32686,7 +35581,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ forward?: string; /** @@ -32696,7 +35592,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ backward?: string; /** @@ -32706,7 +35603,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ up?: string; /** @@ -32716,7 +35614,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ down?: string; /** @@ -32726,7 +35625,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ left?: string; /** @@ -32736,7 +35636,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ right?: string; } @@ -32748,7 +35649,8 @@ declare interface FocusMovement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyboardAvoidMode { /** @@ -32757,7 +35659,8 @@ declare enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -32767,7 +35670,8 @@ declare enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 1, } @@ -32779,7 +35683,8 @@ declare enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HoverModeAreaType { @@ -32789,7 +35694,8 @@ declare enum HoverModeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_SCREEN = 0, @@ -32799,19 +35705,21 @@ declare enum HoverModeAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_SCREEN = 1, } /** * Defines a range of dates. - * + * * @interface DateRange * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DateRange { /** @@ -32821,7 +35729,8 @@ declare interface DateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -32832,7 +35741,135 @@ declare interface DateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; } + +/** + * Define drag start animation effect from drag preview to the handle drag image + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ +declare enum DraggingSizeChangeEffect { + /** + * Default effect, no transition. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + DEFAULT = 0, + + /** + * Only scaled transition, this parameter take effect when PREVIEW_MODE is not DISABLE_SCALE. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + SIZE_TRANSITION = 1, + + /** + * Scaled and content transition together, this size transition take effect when PREVIEW_MODE is not DISABLE_SCALE. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + SIZE_CONTENT_TRANSITION = 2, +} + +/** + * Indicates the information when the provider of the embedded UI is terminated. + * + * @interface TerminationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +declare interface TerminationInfo { + /** + * Defines the termination code. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + code: number; + + /** + * Defines the additional termination information. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + want?: Want; +} + +/** + * Defines the format for displaying dates and times. + * + * @typedef { intl.DateTimeOptions } DateTimeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DateTimeOptions = intl.DateTimeOptions; + +/** + * Defines a bindable property + * @interface Bindable + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export declare interface Bindable { + /** + * Defines value of the bindable property. + * @type { T } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + readonly value: T; + + /** + * Defines the callback of the bindable property which will be invork when the property is changed.. + * @type { Callback } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ + readonly onChange: Callback; +} + +/** + * Convert to a bindable property. + * + * @param { T } value - indicate the value of a state property. + * @returns { Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +export declare function $$(value: T): Bindable; diff --git a/api/@internal/component/ets/component3d.d.ts b/api/@internal/component/ets/component3d.d.ts index 86a17a686539a4eab6b12e213cee4d652183e761..fce5aa306ebcf6eb1566359fa891b5dc63f6bae4 100644 --- a/api/@internal/component/ets/component3d.d.ts +++ b/api/@internal/component/ets/component3d.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Scene } from './../../../api/@ohos.graphics.scene'; +import { ResourceStr, Dimension } from './units'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Provides methods for controlling the 3d scene * @@ -33,7 +39,8 @@ declare type Scene = import('../api/@ohos.graphics.scene').Scene; * @enum { number } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModelType { /** @@ -41,7 +48,8 @@ declare enum ModelType { * * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTURE = 0, @@ -50,7 +58,8 @@ declare enum ModelType { * * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SURFACE = 1, } @@ -61,7 +70,8 @@ declare enum ModelType { * @interface SceneOptions * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SceneOptions { /** @@ -70,7 +80,8 @@ declare interface SceneOptions { * @type { ?(ResourceStr | Scene) } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scene?: ResourceStr | Scene; @@ -81,7 +92,8 @@ declare interface SceneOptions { * @default ModelType.SURFACE * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ modelType?: ModelType; } @@ -92,7 +104,8 @@ declare interface SceneOptions { * @interface Component3DInterface * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Component3DInterface { /** @@ -102,7 +115,8 @@ interface Component3DInterface { * @returns { Component3DAttribute } * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (sceneOptions?: SceneOptions): Component3DAttribute; } @@ -111,7 +125,8 @@ interface Component3DInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Component3DAttribute extends CommonMethod { /** @@ -121,7 +136,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ environment(uri: ResourceStr): Component3DAttribute; @@ -133,7 +149,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customRender(uri: ResourceStr, selfRenderUpdate: boolean): Component3DAttribute; @@ -144,7 +161,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shader(uri: ResourceStr): Component3DAttribute; @@ -155,7 +173,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shaderImageTexture(uri: ResourceStr): Component3DAttribute; @@ -166,7 +185,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shaderInputBuffer(buffer: Array): Component3DAttribute; @@ -177,7 +197,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderWidth(value: Dimension): Component3DAttribute; @@ -188,7 +209,8 @@ declare class Component3DAttribute extends CommonMethod { * @returns { Component3DAttribute } The attribute of the component3D * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderHeight(value: Dimension): Component3DAttribute; } diff --git a/api/@internal/component/ets/container_span.d.ts b/api/@internal/component/ets/container_span.d.ts index aa555965ff5a376b23918f47ae722555a6d84828..93349f5594110fdd20fb8b40db8e0634d890e2ac 100644 --- a/api/@internal/component/ets/container_span.d.ts +++ b/api/@internal/component/ets/container_span.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { TextBackgroundStyle } from './span'; +import { AttributeModifier } from './common'; +/*** endif */ + /** * Span container interface. * @@ -33,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContainerSpanInterface { /** @@ -51,7 +57,8 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (): ContainerSpanAttribute; } @@ -69,7 +76,8 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ContainerSpanAttribute { /** @@ -89,7 +97,8 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle(style: TextBackgroundStyle): ContainerSpanAttribute; @@ -101,7 +110,8 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ attributeModifier(modifier: AttributeModifier): ContainerSpanAttribute; } diff --git a/api/@internal/component/ets/content_slot.d.ts b/api/@internal/component/ets/content_slot.d.ts index bd90fd20c45908b87e2a06683be939ab9d27fd1e..79d291376e5b609e3da7154bdc6f034118edba0f 100644 --- a/api/@internal/component/ets/content_slot.d.ts +++ b/api/@internal/component/ets/content_slot.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Content } from '../../@ohos.arkui.node'; +/*** endif */ + /** * Define Content type * @@ -35,7 +39,8 @@ declare type Content = import('../api/@ohos.arkui.node').Content; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ContentSlotAttribute { } @@ -47,7 +52,8 @@ declare class ContentSlotAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ContentSlotInterface { /** @@ -58,7 +64,8 @@ interface ContentSlotInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (content: Content): ContentSlotAttribute; } diff --git a/api/@internal/component/ets/counter.d.ts b/api/@internal/component/ets/counter.d.ts index 9fb6cf9cc9fa2759b59f405ff41a7123d2f7594c..c71cb953d8895791c1addc4b88d4980afbae03a4 100644 --- a/api/@internal/component/ets/counter.d.ts +++ b/api/@internal/component/ets/counter.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +import { VoidCallback } from './units' +/*** endif */ + /** * Counter component, which provides corresponding increment or decrement counting operations. * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CounterInterface { /** @@ -85,7 +91,8 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): CounterAttribute; } @@ -122,7 +129,8 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CounterAttribute extends CommonMethod { /** @@ -173,7 +181,8 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onInc(event: VoidCallback): CounterAttribute; @@ -225,7 +234,8 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDec(event: VoidCallback): CounterAttribute; @@ -246,7 +256,8 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableDec(value: boolean): CounterAttribute; @@ -267,7 +278,8 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableInc(value: boolean): CounterAttribute; } diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index 8002913639470deb5b3d08ab8cd462b682851a63..49daae0666a9080a93f6d37e1509f0a493c23f58 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -18,6 +18,20 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { + Rectangle, AnimateParam, Callback, ShadowOptions, ShadowStyle, KeyboardAvoidMode, BlurStyle, HoverModeAreaType, + DismissReason, BackgroundBlurStyleOptions, BackgroundEffectOptions +} from './common'; +import { CustomBuilder } from './builder'; +import { DialogAlignment } from './alertDialog'; +import { Offset, ResourceColor, Dimension, BorderRadiuses, EdgeWidths, EdgeColors, EdgeStyles } from './units'; +import { BorderStyle } from './enums'; +import { LengthMetrics } from '../Graphics'; +import { LevelMode, LevelOrder, ImmersiveMode } from '../../@ohos.promptAction'; +import { CustomBuilder } from './builder'; +/*** endif */ + /** * Defines the options of CustomDialogController. * @@ -40,7 +54,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomDialogControllerOptions { /** @@ -69,6 +84,18 @@ declare interface CustomDialogControllerOptions { */ builder: any; + /** + * Custom builder function. + * + * @type { CustomBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + builder: CustomBuilder; + /** * Defines the cancel function. * @@ -91,7 +118,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cancel?: () => void; @@ -117,7 +145,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoCancel?: boolean; @@ -143,7 +172,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -169,7 +199,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -195,7 +226,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ customStyle?: boolean; @@ -221,7 +253,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridCount?: number; @@ -240,7 +273,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskColor?: ResourceColor; @@ -259,7 +293,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -278,7 +313,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ openAnimation?: AnimateParam; @@ -297,7 +333,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeAnimation?: AnimateParam; @@ -317,7 +354,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showInSubWindow?: boolean; @@ -336,7 +374,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -355,7 +394,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses; @@ -374,7 +414,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isModal?: boolean; @@ -385,7 +426,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDismiss?: Callback; @@ -396,7 +438,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Dimension; @@ -407,7 +450,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Dimension; @@ -418,7 +462,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths; @@ -429,7 +474,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors; @@ -440,7 +486,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; @@ -451,7 +498,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -463,7 +511,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -474,7 +523,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -485,7 +535,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -497,7 +548,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -509,7 +561,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -521,7 +574,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -532,7 +586,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: Callback; @@ -543,7 +598,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: Callback; @@ -554,7 +610,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: Callback; @@ -565,7 +622,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: Callback; @@ -576,7 +634,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidDistance?: LengthMetrics; @@ -588,7 +647,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelMode?: LevelMode; @@ -599,7 +659,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ levelUniqueId?: number; @@ -611,7 +672,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; @@ -623,7 +685,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; @@ -635,7 +698,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ focusable?: boolean; } @@ -647,7 +711,8 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** @@ -657,7 +722,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dismiss: Callback; @@ -668,7 +734,8 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: DismissReason; } @@ -702,7 +769,8 @@ declare type PromptActionCommonState = import('../api/@ohos.promptAction').promp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CustomDialogController { /** @@ -727,7 +795,8 @@ declare class CustomDialogController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: CustomDialogControllerOptions); @@ -754,6 +823,17 @@ declare class CustomDialogController { */ open(); + /** + * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + open(): void; + /** * Closes the custom pop-up window. If the window is closed, the window does not take effect. * @@ -777,6 +857,17 @@ declare class CustomDialogController { */ close(); + /** + * Closes the custom pop-up window. If the window is closed, the window does not take effect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + close(): void; + /** * Get the state of the custom pop-up window. * diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index 02fa057c4e305c64e3a0987eadca2622188b0030..a68c0a2617af7956befb55d0df0f1db64a0fb264 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length } from './units' +import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common' +/*** endif */ + /** * DataPanelType enum * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DataPanelType { /** @@ -81,7 +87,8 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Line, @@ -113,7 +120,8 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Circle, } @@ -130,7 +138,8 @@ declare enum DataPanelType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ColorStop { /** @@ -146,7 +155,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color: ResourceColor; @@ -163,7 +173,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset: Length; } @@ -181,7 +192,8 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LinearGradient { /** @@ -199,7 +211,8 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(colorStops: ColorStop[]); } @@ -221,7 +234,8 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelShadowOptions extends MultiShadowOptions { /** @@ -241,7 +255,8 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colors?: Array; } @@ -278,7 +293,8 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelOptions { /** @@ -313,7 +329,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ values: number[]; @@ -349,7 +366,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ max?: number; @@ -385,7 +403,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: DataPanelType; } @@ -422,7 +441,8 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DataPanelInterface { /** @@ -461,7 +481,8 @@ interface DataPanelInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: DataPanelOptions): DataPanelAttribute; } @@ -474,7 +495,8 @@ interface DataPanelInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -484,7 +506,8 @@ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -571,7 +596,8 @@ declare class DataPanelAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeEffect(value: boolean): DataPanelAttribute; @@ -592,7 +618,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valueColors(value: Array): DataPanelAttribute; @@ -613,7 +640,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackBackgroundColor(value: ResourceColor): DataPanelAttribute; @@ -634,7 +662,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: Length): DataPanelAttribute; @@ -655,7 +684,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; @@ -667,7 +697,8 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): DataPanelAttribute; } diff --git a/api/@internal/component/ets/date_picker.d.ts b/api/@internal/component/ets/date_picker.d.ts index 1790b42ae75432b91bd0f882f01146d13ee73ee9..ef34f0a6c39cc71174a331a2d5078e7b275cb1b4 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, Callback, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, DateTimeOptions } from './common' +import { ResourceColor, Offset, VoidCallback } from './units' +import { DialogAlignment } from './alertDialog' +import { CrownSensitivity } from './enums' +/*** endif */ + /** * Defines the struct of DatePickerResult. * @@ -40,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DatePickerResult { /** @@ -70,7 +78,8 @@ declare interface DatePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ year?: number; @@ -101,7 +110,8 @@ declare interface DatePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ month?: number; @@ -131,7 +141,8 @@ declare interface DatePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ day?: number; } @@ -143,7 +154,8 @@ declare interface DatePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DatePickerMode { /** @@ -152,7 +164,8 @@ declare enum DatePickerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DATE = 0, @@ -162,7 +175,8 @@ declare enum DatePickerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ YEAR_AND_MONTH = 1, @@ -175,7 +189,8 @@ declare enum DatePickerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MONTH_AND_DAY = 2, } @@ -202,7 +217,8 @@ declare enum DatePickerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DatePickerOptions { /** @@ -228,7 +244,8 @@ declare interface DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -255,7 +272,8 @@ declare interface DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; @@ -282,17 +300,13 @@ declare interface DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: Date; /** - * Date columns to be displayed. - * - *

NOTE: - *
In DatePickerDialog, with showTime=true, this parameter has no effect and the default three columns for year, - *
month, and day are displayed. - *

+ * Defines the mode of the date picker. * * @type { ?DatePickerMode } * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. @@ -300,7 +314,8 @@ declare interface DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: DatePickerMode; } @@ -327,7 +342,8 @@ declare interface DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DatePickerInterface { /** @@ -355,7 +371,8 @@ interface DatePickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: DatePickerOptions): DatePickerAttribute; } @@ -382,7 +399,8 @@ interface DatePickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DatePickerAttribute extends CommonMethod { /** @@ -413,7 +431,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lunar(value: boolean): DatePickerAttribute; @@ -429,7 +448,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ lunar(isLunar: Optional): DatePickerAttribute; @@ -451,7 +471,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; @@ -465,7 +486,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(style: Optional): DatePickerAttribute; @@ -488,7 +510,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(value: PickerTextStyle): DatePickerAttribute; @@ -503,7 +526,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(style: Optional): DatePickerAttribute; @@ -520,12 +544,13 @@ declare class DatePickerAttribute extends CommonMethod { * Sets the text style for the selected item. * * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} + * @default {
color: '#ff007dff',
font: {
size: '20fp',
weight: FontWeight.Medium
}
} * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; @@ -534,12 +559,13 @@ declare class DatePickerAttribute extends CommonMethod { * this API supports the undefined type for the style parameter. * * @param { Optional } style - Font color, font size, and font weight of the selected item. - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} + * @default {
color: '#ff007dff',
font: {
size: '20fp',
weight: FontWeight.Medium
}
} * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(style: Optional): DatePickerAttribute; @@ -583,7 +609,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDateChange(callback: Callback): DatePickerAttribute; @@ -595,7 +622,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDateChange(callback: Optional>): DatePickerAttribute; @@ -608,7 +636,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): DatePickerAttribute; @@ -622,11 +651,12 @@ declare class DatePickerAttribute extends CommonMethod { * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: Optional): DatePickerAttribute; - /** +/** * Can scroll loop if true is set, on the contrary it can not. * * @param { Optional } isLoop @@ -646,7 +676,8 @@ declare class DatePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LunarSwitchStyle { /** @@ -657,7 +688,8 @@ declare interface LunarSwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor?: ResourceColor; @@ -669,7 +701,8 @@ declare interface LunarSwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor?: ResourceColor; @@ -681,7 +714,8 @@ declare interface LunarSwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor?: ResourceColor; } @@ -711,7 +745,8 @@ declare interface LunarSwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DatePickerDialogOptions extends DatePickerOptions { /** @@ -738,7 +773,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lunar?: boolean; @@ -753,13 +789,14 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { /** * Whether to display the lunar calendar switch. * The value true means to display the lunar calendar switch, and false means the opposite. - * + * * @type { ?boolean } value - indicates whether to show the switch to display the lunar. * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lunarSwitch?: boolean; @@ -768,11 +805,12 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * * @type { ?LunarSwitchStyle } * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), - *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. + * unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ lunarSwitchStyle?: LunarSwitchStyle; @@ -792,13 +830,14 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { *
With showTime=true, the mode parameter has no effect and the default three columns for year, *
month, and day are displayed. *

- * + * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showTime?: boolean; @@ -823,7 +862,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime?: boolean; @@ -843,7 +883,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle?: PickerTextStyle; @@ -863,7 +904,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: PickerTextStyle; @@ -880,7 +922,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -897,7 +940,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -913,11 +957,12 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * Font color, font size, and font width of the selected item. * * @type { ?PickerTextStyle } - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} + * @default { color: '#ff007dff', font: { size: '20fp', weight: FontWeight.Medium } } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle?: PickerTextStyle; @@ -938,7 +983,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -958,7 +1004,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -978,7 +1025,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -1025,7 +1073,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: VoidCallback; @@ -1070,7 +1119,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDateAccept?: Callback; @@ -1105,7 +1155,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDateChange?: Callback; @@ -1126,7 +1177,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -1147,7 +1199,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -1158,7 +1211,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -1169,7 +1223,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -1200,7 +1255,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: VoidCallback; @@ -1225,7 +1281,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: VoidCallback; @@ -1252,7 +1309,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: VoidCallback; @@ -1279,7 +1337,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: VoidCallback; @@ -1292,7 +1351,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -1310,7 +1370,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeOptions?: DateTimeOptions; @@ -1322,7 +1383,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1334,7 +1396,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1346,7 +1409,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback?: boolean; @@ -1382,7 +1446,8 @@ declare interface DatePickerDialogOptions extends DatePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DatePickerDialog { /** diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts index 2ee8f0971bbda0b25ebc343538ec63643465cef9..050b2be84efb5d8950c3841d1d63efbdb0df172d 100644 --- a/api/@internal/component/ets/divider.d.ts +++ b/api/@internal/component/ets/divider.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor } from './units'; +import { CommonMethod} from './common'; +import { LineCapStyle } from './enums'; +/*** endif */ + /** * Provides a divider component to separate different content blocks/content elements. * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DividerInterface { /** @@ -85,7 +92,8 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): DividerAttribute; } @@ -122,7 +130,8 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DividerAttribute extends CommonMethod { /** @@ -165,12 +174,13 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): DividerAttribute; /** - * Sets the color of the divider line. + * Sets the color of the dividing line. * * @param { ResourceColor } value * @returns { DividerAttribute } @@ -178,7 +188,7 @@ declare class DividerAttribute extends CommonMethod { * @since 7 */ /** - * Sets the color of the divider line. + * Sets the color of the dividing line. * * @param { ResourceColor } value * @returns { DividerAttribute } @@ -187,7 +197,7 @@ declare class DividerAttribute extends CommonMethod { * @since 9 */ /** - * Sets the color of the divider line. + * Sets the color of the dividing line. * * @param { ResourceColor } value * @returns { DividerAttribute } @@ -197,7 +207,7 @@ declare class DividerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the color of the divider line. + * Sets the color of the dividing line. * * @param { ResourceColor } value * @returns { DividerAttribute } @@ -205,7 +215,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): DividerAttribute; @@ -245,12 +256,13 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(value: number | string): DividerAttribute; /** - * Sets the end style of the split line. The default value is Butt. + * Sets the end style of the dividing line. The default value is Butt. * * @param { LineCapStyle } value * @returns { DividerAttribute } @@ -258,7 +270,7 @@ declare class DividerAttribute extends CommonMethod { * @since 7 */ /** - * Sets the end style of the split line. The default value is Butt. + * Sets the end style of the dividing line. The default value is Butt. * * @param { LineCapStyle } value * @returns { DividerAttribute } @@ -267,7 +279,7 @@ declare class DividerAttribute extends CommonMethod { * @since 9 */ /** - * Sets the end style of the split line. The default value is Butt. + * Sets the end style of the dividing line. The default value is Butt. * * @param { LineCapStyle } value * @returns { DividerAttribute } @@ -277,7 +289,7 @@ declare class DividerAttribute extends CommonMethod { * @since 10 */ /** - * Sets the end style of the split line. The default value is Butt. + * Sets the end style of the dividing line. The default value is Butt. * * @param { LineCapStyle } value * @returns { DividerAttribute } @@ -285,7 +297,8 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineCap(value: LineCapStyle): DividerAttribute; } diff --git a/api/@internal/component/ets/effect_component.d.ts b/api/@internal/component/ets/effect_component.d.ts index c09b5630fe460afc86cb7664c991a81a67f4f878..976c65e85eb76b7c3f33c1511c4e6423a0921bca 100644 --- a/api/@internal/component/ets/effect_component.d.ts +++ b/api/@internal/component/ets/effect_component.d.ts @@ -17,7 +17,10 @@ * @file * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Provides an Effect Component, which is invisible, but setting properties on this component defines an effect template * that child components can apply by setting useEffect(true). @@ -25,7 +28,8 @@ * @interface EffectComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface EffectComponentInterface { /** @@ -34,7 +38,8 @@ interface EffectComponentInterface { * @returns { EffectComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (): EffectComponentAttribute; @@ -96,8 +101,8 @@ declare enum EffectLayer { * @since 20 */ declare interface EffectComponentOptions { - - /** Use this to determine the component layer 1evel. Default value is none. + /** + * Use this to determine the component layer level. Default value is none. * * @type { ?EffectLayer } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -113,7 +118,8 @@ declare interface EffectComponentOptions { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EffectComponentAttribute extends CommonMethod { /** diff --git a/api/@internal/component/ets/ellipse.d.ts b/api/@internal/component/ets/ellipse.d.ts index 678b4141462ef6629f151fd8d9d1f0530e336c32..a9db624f8ba81a5bce248fc8fcd35878811c8af3 100644 --- a/api/@internal/component/ets/ellipse.d.ts +++ b/api/@internal/component/ets/ellipse.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +/*** endif */ + /** * Ellipse constructor options. * @@ -26,7 +30,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface EllipseOptions { /** @@ -63,7 +68,7 @@ interface EllipseOptions { * @atomicservice * @since 11 */ - /** +/** * Set width. * Anonymous Object Rectification. * @@ -85,6 +90,18 @@ interface EllipseOptions { * @since 20 */ width?: Length; + /** + * Set width. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: string | number; /** * Set height. @@ -120,7 +137,7 @@ interface EllipseOptions { * @atomicservice * @since 11 */ - /** +/** * Set height. * Anonymous Object Rectification. * @@ -142,6 +159,18 @@ interface EllipseOptions { * @since 20 */ height?: Length; + /** + * Set height. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: string | number; } /** @@ -308,7 +337,8 @@ interface EllipseInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EllipseAttribute extends CommonShapeMethod {} @@ -375,3 +405,30 @@ declare const Ellipse: EllipseInterface; * @since 11 */ declare const EllipseInstance: EllipseAttribute; + +/** + * Ellipse drawing. + * + * @interface EllipseInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EllipseInterface { + /** + * Set the value. + * + * @param { EllipseOptions } [options] - ellipse options + * @returns { EllipseAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: EllipseOptions): EllipseAttribute; +} diff --git a/api/@internal/component/ets/embedded_component.d.ts b/api/@internal/component/ets/embedded_component.d.ts index 48a15bb05a5d230625ea2f63cf15ec9e075a4af1..192c8ff3257db3c2dc0af85af69405ff9e31e572 100644 --- a/api/@internal/component/ets/embedded_component.d.ts +++ b/api/@internal/component/ets/embedded_component.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import Want from '../../@ohos.app.ability.Want' +import { Callback, ErrorCallback ,BusinessError} from '../../@ohos.base' +import { CommonMethod, TerminationInfo } from './common' +import { EmbeddedType } from './enums' +/*** endif */ /** * Provide an interface for the EmbeddedComponent, which is used @@ -26,7 +32,8 @@ * @interface EmbeddedComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EmbeddedComponentInterface { /** @@ -44,6 +51,23 @@ interface EmbeddedComponentInterface { loader: import('../api/@ohos.app.ability.Want').default, type: EmbeddedType ): EmbeddedComponentAttribute; + + /** + * Construct the EmbeddedComponent.
+ * Called when the EmbeddedComponent is used. + * + * @param { Want } loader - indicates initialization parameter + * @param { EmbeddedType } type - indicates type of the EmbeddedComponent + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + ( + loader: Want, + type: EmbeddedType + ): EmbeddedComponentAttribute; } /** @@ -82,7 +106,8 @@ declare interface TerminationInfo { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EmbeddedComponentAttribute extends CommonMethod { /** @@ -96,6 +121,18 @@ declare class EmbeddedComponentAttribute extends CommonMethod): EmbeddedComponentAttribute; + /** + * Called when the provider of the embedded UI is terminated. + * + * @param { Callback } callback + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onTerminated(callback: Callback): EmbeddedComponentAttribute; + /** * Called when some error occurred. * @@ -106,6 +143,18 @@ declare class EmbeddedComponentAttribute extends CommonMethod } callback + * @returns { EmbeddedComponentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onError(callback: ErrorCallback): EmbeddedComponentAttribute; } /** diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 94b9a985344692b96121c7377fee9da41acc2d33..2e5d0c1308c902afec631332dc5c38370801a03e 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -35,7 +35,8 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CheckBoxShape { /** @@ -53,7 +54,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 0, @@ -72,7 +74,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROUNDED_SQUARE = 1, } @@ -109,7 +112,8 @@ declare enum CheckBoxShape { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Color { /** @@ -140,7 +144,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ White, @@ -172,7 +177,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Black, @@ -204,7 +210,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Blue, @@ -236,7 +243,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Brown, @@ -268,7 +276,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Gray, @@ -300,7 +309,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Green, @@ -332,7 +342,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Grey, @@ -364,7 +375,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Orange, @@ -396,7 +408,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pink, @@ -428,7 +441,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Red, @@ -460,7 +474,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Yellow, @@ -486,7 +501,8 @@ declare enum Color { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Transparent, } @@ -506,7 +522,8 @@ declare enum Color { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ColoringStrategy { /** @@ -522,7 +539,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INVERT = 'invert', @@ -539,7 +557,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERAGE = 'average', @@ -556,7 +575,8 @@ declare enum ColoringStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIMARY = 'primary', } @@ -593,7 +613,8 @@ declare enum ColoringStrategy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageFit { /** @@ -624,7 +645,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Contain, @@ -656,7 +678,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cover, @@ -688,7 +711,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -720,7 +744,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fill, @@ -752,7 +777,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleDown, @@ -784,7 +810,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -795,7 +822,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_START = 7, @@ -806,7 +834,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 8, @@ -817,7 +846,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_END = 9, @@ -828,7 +858,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 10, @@ -839,7 +870,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 11, @@ -850,7 +882,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 12, @@ -861,7 +894,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_START = 13, @@ -872,7 +906,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 14, @@ -883,7 +918,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_END = 15, @@ -893,7 +929,8 @@ declare enum ImageFit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ MATRIX = 16, } @@ -930,7 +967,8 @@ declare enum ImageFit { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BorderStyle { /** @@ -961,7 +999,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Dotted, @@ -993,7 +1032,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Dashed, @@ -1025,7 +1065,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Solid, } @@ -1062,7 +1103,8 @@ declare enum BorderStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineJoinStyle { /** @@ -1093,7 +1135,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Miter, @@ -1125,7 +1168,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, @@ -1157,7 +1201,8 @@ declare enum LineJoinStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bevel, } @@ -1184,7 +1229,8 @@ declare enum LineJoinStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TouchType { /** @@ -1206,7 +1252,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -1229,7 +1276,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, @@ -1252,7 +1300,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Move, @@ -1275,7 +1324,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cancel, @@ -1327,7 +1377,8 @@ declare enum TouchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum InteractionHand { /** @@ -1336,7 +1387,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1346,7 +1398,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 1, @@ -1356,7 +1409,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 2, } @@ -1383,7 +1437,8 @@ declare enum InteractionHand { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MouseButton { /** @@ -1405,7 +1460,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -1428,7 +1484,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -1451,7 +1508,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Middle, @@ -1474,7 +1532,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Back, @@ -1497,7 +1556,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Forward, @@ -1520,7 +1580,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -1547,7 +1608,8 @@ declare enum MouseButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MouseAction { /** @@ -1569,7 +1631,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Press, @@ -1592,7 +1655,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Release, @@ -1615,7 +1679,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Move, @@ -1638,7 +1703,8 @@ declare enum MouseAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Hover, @@ -1647,7 +1713,8 @@ declare enum MouseAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 13 } @@ -1676,7 +1743,8 @@ declare enum MouseAction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AnimationStatus { /** @@ -1700,7 +1768,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Initial, @@ -1725,7 +1794,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Running, @@ -1750,7 +1820,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Paused, @@ -1775,7 +1846,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stopped, } @@ -1812,7 +1884,8 @@ declare enum AnimationStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Curve { /** @@ -1843,7 +1916,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear, @@ -1875,7 +1949,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ease, @@ -1907,7 +1982,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseIn, @@ -1939,7 +2015,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseOut, @@ -1971,7 +2048,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ EaseInOut, @@ -2003,7 +2081,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FastOutSlowIn, @@ -2035,7 +2114,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LinearOutSlowIn, @@ -2067,7 +2147,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FastOutLinearIn, @@ -2099,7 +2180,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ExtremeDeceleration, @@ -2131,7 +2213,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sharp, @@ -2163,7 +2246,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Rhythm, @@ -2195,7 +2279,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Smooth, @@ -2227,7 +2312,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Friction, } @@ -2256,7 +2342,8 @@ declare enum Curve { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FillMode { /** @@ -2280,7 +2367,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -2305,7 +2393,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Forwards, @@ -2330,7 +2419,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Backwards, @@ -2355,7 +2445,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Both, } @@ -2392,7 +2483,8 @@ declare enum FillMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PlayMode { /** @@ -2423,7 +2515,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -2455,7 +2548,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Reverse, @@ -2487,7 +2581,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Alternate, @@ -2519,7 +2614,8 @@ declare enum PlayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AlternateReverse, } @@ -2546,7 +2642,8 @@ declare enum PlayMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyType { /** @@ -2568,7 +2665,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -2591,7 +2689,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, } @@ -2618,7 +2717,8 @@ declare enum KeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeySource { /** @@ -2640,7 +2740,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Unknown, @@ -2663,7 +2764,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Keyboard, @@ -2673,7 +2775,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ JOYSTICK, } @@ -2700,7 +2803,8 @@ declare enum KeySource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Edge { /** @@ -2722,7 +2826,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -2754,7 +2859,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -2786,7 +2892,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -2818,7 +2925,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -2845,7 +2953,8 @@ declare enum Edge { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Week { /** @@ -2867,7 +2976,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mon, @@ -2890,7 +3000,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Tue, @@ -2913,7 +3024,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Wed, @@ -2936,7 +3048,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Thur, @@ -2959,7 +3072,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fri, @@ -2982,7 +3096,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sat, @@ -3005,7 +3120,8 @@ declare enum Week { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sun, } @@ -3042,7 +3158,8 @@ declare enum Week { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Direction { /** @@ -3073,7 +3190,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ltr, @@ -3105,7 +3223,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Rtl, @@ -3137,7 +3256,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -3174,7 +3294,8 @@ declare enum Direction { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarState { /** @@ -3205,7 +3326,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Off, @@ -3237,7 +3359,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -3269,7 +3392,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ On, } @@ -3306,7 +3430,8 @@ declare enum BarState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EdgeEffect { /** @@ -3337,7 +3462,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Spring, @@ -3369,7 +3495,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fade, @@ -3401,7 +3528,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -3438,7 +3566,8 @@ declare enum EdgeEffect { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Alignment { /** @@ -3469,7 +3598,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopStart, @@ -3501,7 +3631,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -3533,7 +3664,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopEnd, @@ -3565,7 +3697,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -3597,7 +3730,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -3629,7 +3763,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -3661,7 +3796,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomStart, @@ -3693,7 +3829,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -3725,7 +3862,8 @@ declare enum Alignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomEnd, } @@ -3865,7 +4003,8 @@ declare enum LocalizedAlignment { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TransitionType { /** @@ -3896,7 +4035,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, @@ -3928,7 +4068,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Insert, @@ -3960,7 +4101,8 @@ declare enum TransitionType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Delete, } @@ -3987,7 +4129,8 @@ declare enum TransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RelateType { /** @@ -4009,7 +4152,8 @@ declare enum RelateType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FILL, @@ -4032,7 +4176,8 @@ declare enum RelateType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FIT, } @@ -4069,7 +4214,8 @@ declare enum RelateType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Visibility { /** @@ -4100,7 +4246,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Visible, @@ -4132,7 +4279,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Hidden, @@ -4164,7 +4312,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -4201,7 +4350,8 @@ declare enum Visibility { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineCapStyle { /** @@ -4232,7 +4382,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Butt, @@ -4264,25 +4415,26 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Round, /** - * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. + * Extends half a circle at the end of the path with a width equal to half the dividing line width and a height equal to the dividing line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. + * Extends half a circle at the end of the path with a width equal to half the dividing line width and a height equal to the dividing line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. + * Extends half a circle at the end of the path with a width equal to half the dividing line width and a height equal to the dividing line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4290,13 +4442,14 @@ declare enum LineCapStyle { * @since 10 */ /** - * Extends half a circle at the end of the path with a width equal to half the line width and a height equal to the line width. + * Extends half a circle at the end of the path with a width equal to half the dividing line width and a height equal to the dividing line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Square, } @@ -4333,7 +4486,8 @@ declare enum LineCapStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Axis { /** @@ -4364,7 +4518,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -4396,7 +4551,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, } @@ -4433,7 +4589,8 @@ declare enum Axis { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HorizontalAlign { /** @@ -4464,7 +4621,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4496,7 +4654,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4528,7 +4687,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -4565,7 +4725,8 @@ declare enum HorizontalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexAlign { /** @@ -4600,7 +4761,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4636,7 +4798,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4672,7 +4835,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -4712,7 +4876,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceBetween, @@ -4752,7 +4917,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceAround, @@ -4792,7 +4958,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SpaceEvenly, } @@ -4829,7 +4996,8 @@ declare enum FlexAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ItemAlign { /** @@ -4860,7 +5028,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -4892,7 +5061,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -4924,7 +5094,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -4956,7 +5127,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -4988,7 +5160,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Baseline, @@ -5020,7 +5193,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stretch, } @@ -5057,7 +5231,8 @@ declare enum ItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexDirection { /** @@ -5088,7 +5263,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -5120,7 +5296,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Column, @@ -5152,7 +5329,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, @@ -5184,7 +5362,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ColumnReverse, } @@ -5197,7 +5376,8 @@ declare enum FlexDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PixelRoundCalcPolicy { /** @@ -5207,7 +5387,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NO_FORCE_ROUND = 0, /** @@ -5217,7 +5398,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORCE_CEIL = 1, /** @@ -5227,7 +5409,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORCE_FLOOR = 2, } @@ -5240,7 +5423,8 @@ declare enum PixelRoundCalcPolicy { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PixelRoundMode { /** @@ -5250,7 +5434,8 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_ROUND_ON_LAYOUT_FINISH = 0, /** @@ -5260,7 +5445,8 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_ROUND_AFTER_MEASURE = 1, } @@ -5297,24 +5483,25 @@ declare enum PixelRoundMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FlexWrap { /** - * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. + * The Flex container has a single row/column layout of elements, and children are not allowed to go beyond the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. + * The Flex container has a single row/column layout of elements, and children are not allowed to go beyond the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. + * The Flex container has a single row/column layout of elements, and children are not allowed to go beyond the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5322,13 +5509,14 @@ declare enum FlexWrap { * @since 10 */ /** - * The Flex container has a single row/column layout of elements, and children are allowed to go beyond the container. + * The Flex container has a single row/column layout of elements, and children are not allowed to go beyond the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NoWrap, @@ -5360,7 +5548,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Wrap, @@ -5392,7 +5581,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ WrapReverse, } @@ -5429,7 +5619,8 @@ declare enum FlexWrap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum VerticalAlign { /** @@ -5460,7 +5651,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -5492,7 +5684,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -5524,7 +5717,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, } @@ -5561,7 +5755,8 @@ declare enum VerticalAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRepeat { /** @@ -5592,7 +5787,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NoRepeat, @@ -5624,7 +5820,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ X, @@ -5656,7 +5853,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Y, @@ -5688,7 +5886,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ XY, } @@ -5725,7 +5924,8 @@ declare enum ImageRepeat { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageSize { /** @@ -5756,7 +5956,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -5788,7 +5989,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Cover, @@ -5820,7 +6022,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Contain, @@ -5830,7 +6033,8 @@ declare enum ImageSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FILL = 3, } @@ -5867,7 +6071,8 @@ declare enum ImageSize { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GradientDirection { /** @@ -5898,7 +6103,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -5930,7 +6136,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -5962,7 +6169,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -5994,7 +6202,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -6026,7 +6235,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftTop, @@ -6058,7 +6268,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftBottom, @@ -6090,7 +6301,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -6122,7 +6334,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightBottom, @@ -6154,7 +6367,8 @@ declare enum GradientDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -6181,7 +6395,8 @@ declare enum GradientDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SharedTransitionEffectType { /** @@ -6206,7 +6421,8 @@ declare enum SharedTransitionEffectType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Static, @@ -6229,7 +6445,8 @@ declare enum SharedTransitionEffectType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Exchange, } @@ -6266,7 +6483,8 @@ declare enum SharedTransitionEffectType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FontStyle { /** @@ -6297,7 +6515,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -6329,7 +6548,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Italic, } @@ -6366,7 +6586,8 @@ declare enum FontStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FontWeight { /** @@ -6397,7 +6618,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Lighter, @@ -6429,7 +6651,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -6461,7 +6684,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Regular, @@ -6493,7 +6717,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Medium, @@ -6525,7 +6750,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bold, @@ -6557,7 +6783,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bolder, } @@ -6594,7 +6821,8 @@ declare enum FontWeight { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextAlign { /** @@ -6625,7 +6853,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -6657,7 +6886,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -6689,7 +6919,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, @@ -6708,7 +6939,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ JUSTIFY, } @@ -6745,7 +6977,8 @@ declare enum TextAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextOverflow { /** @@ -6776,7 +7009,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -6808,7 +7042,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Clip, @@ -6840,7 +7075,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ellipsis, @@ -6857,7 +7093,8 @@ declare enum TextOverflow { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MARQUEE, } @@ -6894,7 +7131,8 @@ declare enum TextOverflow { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDecorationType { /** @@ -6925,7 +7163,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -6957,7 +7196,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Underline, @@ -6989,7 +7229,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Overline, @@ -7021,7 +7262,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LineThrough, } @@ -7058,7 +7300,8 @@ declare enum TextDecorationType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextCase { /** @@ -7089,7 +7332,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -7121,7 +7365,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LowerCase, @@ -7153,7 +7398,8 @@ declare enum TextCase { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ UpperCase, } @@ -7173,7 +7419,8 @@ declare enum TextCase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextHeightAdaptivePolicy { /** @@ -7193,7 +7440,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MAX_LINES_FIRST, @@ -7214,7 +7462,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIN_FONT_SIZE_FIRST, @@ -7237,7 +7486,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LAYOUT_CONSTRAINT_FIRST, } @@ -7264,7 +7514,8 @@ declare enum TextHeightAdaptivePolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ResponseType { /** @@ -7286,7 +7537,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightClick, @@ -7309,7 +7561,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LongPress, } @@ -7336,7 +7589,8 @@ declare enum ResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HoverEffect { /** @@ -7358,7 +7612,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, @@ -7381,7 +7636,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scale, @@ -7404,7 +7660,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Highlight, @@ -7427,7 +7684,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -7454,7 +7712,8 @@ declare enum HoverEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum Placement { /** @@ -7476,7 +7735,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -7499,7 +7759,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -7522,7 +7783,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -7545,7 +7807,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -7568,7 +7831,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopLeft, @@ -7591,7 +7855,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TopRight, @@ -7614,7 +7879,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomLeft, @@ -7637,7 +7903,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BottomRight, @@ -7660,7 +7927,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftTop, @@ -7683,7 +7951,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LeftBottom, @@ -7706,7 +7975,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightTop, @@ -7729,7 +7999,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RightBottom, } @@ -7749,7 +8020,8 @@ declare enum Placement { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ArrowPointPosition { /** @@ -7765,7 +8037,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 'Start', @@ -7782,7 +8055,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 'Center', @@ -7799,7 +8073,8 @@ declare enum ArrowPointPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 'End', } @@ -7829,7 +8104,8 @@ declare enum ArrowPointPosition { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CopyOptions { /** @@ -7854,7 +8130,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -7880,7 +8157,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ InApp = 1, @@ -7906,7 +8184,8 @@ declare enum CopyOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LocalDevice = 2, @@ -7944,7 +8223,8 @@ declare enum CopyOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HitTestMode { /** @@ -7969,7 +8249,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -7995,7 +8276,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Block, @@ -8021,7 +8303,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Transparent, @@ -8047,7 +8330,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -8095,7 +8379,8 @@ declare enum HitTestMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TitleHeight { /** @@ -8117,7 +8402,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MainOnly, @@ -8140,7 +8426,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MainWithSub, } @@ -8160,7 +8447,8 @@ declare enum TitleHeight { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ModifierKey { /** @@ -8176,7 +8464,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CTRL, @@ -8193,7 +8482,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SHIFT, @@ -8210,7 +8500,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALT, } @@ -8230,7 +8521,8 @@ declare enum ModifierKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FunctionKey { /** @@ -8246,7 +8538,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ESC, @@ -8263,7 +8556,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F1, @@ -8280,7 +8574,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F2, @@ -8297,7 +8592,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F3, @@ -8314,7 +8610,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F4, @@ -8331,7 +8628,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F5, @@ -8348,7 +8646,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F6, @@ -8365,7 +8664,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F7, @@ -8382,7 +8682,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F8, @@ -8399,7 +8700,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F9, @@ -8416,7 +8718,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F10, @@ -8433,7 +8736,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F11, @@ -8450,7 +8754,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ F12, @@ -8460,7 +8765,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TAB, @@ -8470,7 +8776,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_UP, @@ -8480,7 +8787,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_DOWN, @@ -8490,7 +8798,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_LEFT, @@ -8500,7 +8809,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DPAD_RIGHT, } @@ -8520,7 +8830,8 @@ declare enum FunctionKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageSpanAlignment { /** @@ -8536,7 +8847,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BASELINE, @@ -8553,7 +8865,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, @@ -8570,7 +8883,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER, @@ -8587,7 +8901,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -8616,7 +8931,8 @@ declare enum ImageSpanAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ObscuredReasons { /** @@ -8631,7 +8947,8 @@ declare enum ObscuredReasons { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PLACEHOLDER = 0, } @@ -8650,7 +8967,8 @@ declare enum ObscuredReasons { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextContentStyle { /** @@ -8665,7 +8983,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -8681,7 +9000,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INLINE } @@ -8701,7 +9021,8 @@ declare enum TextContentStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ClickEffectLevel { /** @@ -8721,7 +9042,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT, @@ -8742,7 +9064,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIDDLE, @@ -8763,7 +9086,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HEAVY, } @@ -8790,7 +9114,8 @@ declare enum ClickEffectLevel { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum XComponentType { /** @@ -8812,7 +9137,8 @@ declare enum XComponentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SURFACE, @@ -8843,7 +9169,8 @@ declare enum XComponentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TEXTURE, @@ -8852,8 +9179,9 @@ declare enum XComponentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 20 + * @arkts 1.1&1.2 */ NODE, } @@ -8872,7 +9200,8 @@ declare enum XComponentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NestedScrollMode { /** @@ -8887,7 +9216,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_ONLY, @@ -8903,7 +9233,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_FIRST, @@ -8919,7 +9250,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PARENT_FIRST, @@ -8935,7 +9267,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PARALLEL, } @@ -8946,7 +9279,8 @@ declare enum NestedScrollMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSource { /** @@ -8954,7 +9288,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG = 0, @@ -8963,7 +9298,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLING, @@ -8972,7 +9308,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EDGE_EFFECT, @@ -8981,7 +9318,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OTHER_USER_INPUT, @@ -8990,7 +9328,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR, @@ -8999,7 +9338,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_BAR_FLING, @@ -9008,7 +9348,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLLER, @@ -9017,7 +9358,8 @@ declare enum ScrollSource { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLLER_ANIMATION, } @@ -9047,7 +9389,8 @@ declare enum ScrollSource { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderFit { /** @@ -9072,7 +9415,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 0, /** @@ -9097,7 +9441,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 1, /** @@ -9122,7 +9467,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 2, /** @@ -9147,7 +9493,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 3, /** @@ -9172,7 +9519,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 4, /** @@ -9197,7 +9545,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_LEFT = 5, /** @@ -9222,7 +9571,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TOP_RIGHT = 6, /** @@ -9247,7 +9597,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_LEFT = 7, /** @@ -9272,7 +9623,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM_RIGHT = 8, /** @@ -9297,7 +9649,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_FILL = 9, /** @@ -9328,7 +9681,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN = 10, /** @@ -9365,7 +9719,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN_TOP_LEFT = 11, /** @@ -9402,7 +9757,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTAIN_BOTTOM_RIGHT = 12, /** @@ -9433,7 +9789,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER = 13, /** @@ -9470,7 +9827,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER_TOP_LEFT = 14, /** @@ -9507,7 +9865,8 @@ declare enum RenderFit { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_COVER_BOTTOM_RIGHT = 15, } @@ -9525,7 +9884,8 @@ declare enum RenderFit { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DialogButtonStyle { /** @@ -9539,7 +9899,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -9554,7 +9915,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HIGHLIGHT = 1 } @@ -9566,7 +9928,8 @@ declare enum DialogButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WordBreak { /** @@ -9575,7 +9938,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -9585,7 +9949,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_ALL = 1, @@ -9596,7 +9961,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_WORD = 2, @@ -9606,7 +9972,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HYPHENATION = 3, } @@ -9618,7 +9985,8 @@ declare enum WordBreak { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LineBreakStrategy { /** @@ -9628,7 +9996,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GREEDY = 0, @@ -9639,7 +10008,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_QUALITY = 1, @@ -9650,7 +10020,8 @@ declare enum LineBreakStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BALANCED = 2, } @@ -9661,7 +10032,8 @@ declare enum LineBreakStrategy { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum IlluminatedType { /** @@ -9669,7 +10041,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** @@ -9677,7 +10050,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BORDER = 1, /** @@ -9685,7 +10059,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT = 2, /** @@ -9693,7 +10068,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BORDER_CONTENT = 3, /** @@ -9701,7 +10077,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLOOM_BORDER = 4, /** @@ -9709,7 +10086,8 @@ declare enum IlluminatedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BLOOM_BORDER_CONTENT = 5 } @@ -9729,7 +10107,8 @@ declare enum IlluminatedType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EllipsisMode { /** @@ -9745,7 +10124,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -9762,7 +10142,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, @@ -9779,7 +10160,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2, } @@ -9799,7 +10181,8 @@ declare enum EllipsisMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Nullable = T | undefined; @@ -9819,7 +10202,8 @@ declare type Nullable = T | undefined; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum OptionWidthMode { /** @@ -9835,7 +10219,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 'fit_content', @@ -9852,7 +10237,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_TRIGGER = 'fit_trigger', } @@ -9872,7 +10258,8 @@ declare enum OptionWidthMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FoldStatus { /** @@ -9888,7 +10275,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_UNKNOWN = 0, /** @@ -9904,7 +10292,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_EXPANDED = 1, /** @@ -9920,7 +10309,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_FOLDED = 2, /** @@ -9936,7 +10326,8 @@ declare enum FoldStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLD_STATUS_HALF_FOLDED = 3, } @@ -9947,7 +10338,8 @@ declare enum FoldStatus { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AppRotation { @@ -9956,7 +10348,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_0 = 0, @@ -9965,7 +10358,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_90 = 1, @@ -9974,7 +10368,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_180 = 2, @@ -9983,7 +10378,8 @@ declare enum AppRotation { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_270 = 3 } @@ -9994,7 +10390,8 @@ declare enum AppRotation { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum EmbeddedType { /** @@ -10002,7 +10399,8 @@ declare enum EmbeddedType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_UI_EXTENSION = 0, } @@ -10014,7 +10412,8 @@ declare enum EmbeddedType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeUpdateStrategy { /** @@ -10023,7 +10422,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -10033,7 +10433,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRESERVE_POSITION = 1 } @@ -10045,7 +10446,8 @@ declare enum MarqueeUpdateStrategy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDecorationStyle { /** @@ -10054,7 +10456,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOLID = 0, @@ -10064,7 +10467,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOUBLE = 1, @@ -10074,7 +10478,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOTTED = 2, @@ -10084,7 +10489,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DASHED = 3, @@ -10094,7 +10500,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WAVY = 4, } @@ -10106,7 +10513,8 @@ declare enum TextDecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextSelectableMode { /** @@ -10115,7 +10523,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTABLE_UNFOCUSABLE = 0, @@ -10125,7 +10534,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTABLE_FOCUSABLE = 1, @@ -10135,7 +10545,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNSELECTABLE = 2, } @@ -10147,7 +10558,8 @@ declare enum TextSelectableMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AccessibilityHoverType { /** @@ -10156,7 +10568,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_ENTER = 0, @@ -10166,7 +10579,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_MOVE = 1, @@ -10176,7 +10590,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_EXIT = 2, @@ -10186,7 +10601,8 @@ declare enum AccessibilityHoverType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOVER_CANCEL = 3, } @@ -10197,7 +10613,8 @@ declare enum AccessibilityHoverType { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WidthBreakpoint { /** @@ -10205,7 +10622,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_XS = 0, @@ -10214,7 +10632,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_SM = 1, @@ -10223,7 +10642,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_MD = 2, @@ -10232,7 +10652,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_LG = 3, @@ -10241,7 +10662,8 @@ declare enum WidthBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WIDTH_XL = 4, } @@ -10252,7 +10674,8 @@ declare enum WidthBreakpoint { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum HeightBreakpoint { /** @@ -10260,7 +10683,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_SM = 0, @@ -10269,7 +10693,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_MD = 1, @@ -10278,7 +10703,8 @@ declare enum HeightBreakpoint { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HEIGHT_LG = 2, } @@ -10289,7 +10715,8 @@ declare enum HeightBreakpoint { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AxisModel { /** @@ -10297,7 +10724,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_X = 0, @@ -10307,7 +10735,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_Y = 1, @@ -10316,7 +10745,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_Z = 2, @@ -10325,7 +10755,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_RZ = 3, @@ -10334,7 +10765,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_GAS = 4, @@ -10343,7 +10775,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_BRAKE = 5, @@ -10352,7 +10785,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_HAT0X = 6, @@ -10361,7 +10795,8 @@ declare enum AxisModel { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ABS_HAT0Y = 7, } @@ -10374,7 +10809,8 @@ declare enum AxisModel { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PageFlipMode { /** @@ -10384,7 +10820,8 @@ declare enum PageFlipMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUOUS = 0, @@ -10395,7 +10832,8 @@ declare enum PageFlipMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE = 1, } @@ -10437,7 +10875,8 @@ declare enum FocusWrapMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CrownAction { /** @@ -10445,7 +10884,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BEGIN = 0, @@ -10454,7 +10894,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 1, @@ -10463,7 +10904,8 @@ declare enum CrownAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ END = 2 } @@ -10474,7 +10916,8 @@ declare enum CrownAction { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CrownSensitivity { /** @@ -10482,7 +10925,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOW = 0, @@ -10491,7 +10935,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM = 1, @@ -10500,7 +10945,8 @@ declare enum CrownSensitivity { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 2 } @@ -10511,7 +10957,8 @@ declare enum CrownSensitivity { * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AxisAction { /** @@ -10519,7 +10966,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -10528,7 +10976,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ BEGIN = 1, @@ -10537,7 +10986,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 2, @@ -10546,7 +10996,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ END = 3, @@ -10555,7 +11006,8 @@ declare enum AxisAction { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 4, } @@ -10568,7 +11020,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FocusDrawLevel { /** @@ -10578,7 +11031,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SELF = 0, @@ -10589,7 +11043,8 @@ declare enum AxisAction { * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 1, } @@ -10601,7 +11056,8 @@ declare enum AxisAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DividerMode { /** @@ -10610,7 +11066,8 @@ declare enum DividerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FLOATING_ABOVE_MENU = 0, @@ -10620,7 +11077,8 @@ declare enum DividerMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_IN_MENU = 1, } diff --git a/api/@internal/component/ets/flex.d.ts b/api/@internal/component/ets/flex.d.ts index 7e5a2e45036a5c51d6eca298499d30fdbe8317ad..6c773cd1bd41f6ac0b2d64587409a78e769b45a0 100644 --- a/api/@internal/component/ets/flex.d.ts +++ b/api/@internal/component/ets/flex.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetrics } from '../Graphics'; +import { PointLightStyle, CommonMethod } from './common'; +import { FlexWrap, FlexDirection, ItemAlign, FlexAlign } from './enums'; +/*** endif */ + /** * Defines the options of Flex. * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FlexOptions { /** @@ -86,7 +93,8 @@ declare interface FlexOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: FlexDirection; @@ -123,7 +131,8 @@ declare interface FlexOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ wrap?: FlexWrap; @@ -160,7 +169,8 @@ declare interface FlexOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ justifyContent?: FlexAlign; @@ -197,7 +207,8 @@ declare interface FlexOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems?: ItemAlign; @@ -235,7 +246,8 @@ declare interface FlexOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent?: FlexAlign; @@ -247,7 +259,8 @@ declare interface FlexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ space?: FlexSpaceOptions; } @@ -259,7 +272,8 @@ declare interface FlexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FlexSpaceOptions { @@ -270,18 +284,20 @@ declare interface FlexSpaceOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ main?: LengthMetrics; /** - * Space on the main axis of the Flex component. + * Space on the cross axis of the Flex component. * * @type { ?LengthMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cross?: LengthMetrics; } @@ -318,7 +334,8 @@ declare interface FlexSpaceOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FlexInterface { /** @@ -357,7 +374,8 @@ interface FlexInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: FlexOptions): FlexAttribute; } @@ -394,7 +412,8 @@ interface FlexInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FlexAttribute extends CommonMethod { /** @@ -404,7 +423,8 @@ declare class FlexAttribute extends CommonMethod { * @returns { FlexAttribute } The attribute of the flex. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): FlexAttribute; } diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts index 83656920348360e55b7d6e14c4567918f07fc1e3..70cf009cce4621798a1bdf6ed9125db999f3e241 100644 --- a/api/@internal/component/ets/flow_item.d.ts +++ b/api/@internal/component/ets/flow_item.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +/*** endif */ + /** * Mesh container for static fixed-size layout scenarios. * @@ -40,7 +44,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FlowItemInterface { /** @@ -65,7 +70,8 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): FlowItemAttribute; } @@ -92,7 +98,8 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FlowItemAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/focus.d.ts b/api/@internal/component/ets/focus.d.ts index 495e4f6bbd24387a2f2cc8e0ce18ba47da37a708..74bdff450b6a9735dd7d6475a2efb14f5f0e4970 100644 --- a/api/@internal/component/ets/focus.d.ts +++ b/api/@internal/component/ets/focus.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetrics , ColorMetrics } from '../Graphics'; +/*** endif */ + /** * Focus box style. * @@ -25,7 +29,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FocusBoxStyle { /** @@ -35,7 +40,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: LengthMetrics; /** @@ -45,7 +51,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor?: ColorMetrics; /** @@ -55,7 +62,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: LengthMetrics; } @@ -67,7 +75,8 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FocusPriority { /** @@ -76,7 +85,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -86,7 +96,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIOR = 2000, @@ -96,7 +107,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIOUS = 3000, } @@ -109,7 +121,8 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum KeyProcessingMode { /** @@ -118,7 +131,8 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_NAVIGATION = 0, @@ -128,7 +142,8 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ANCESTOR_EVENT = 1, } \ No newline at end of file diff --git a/api/@internal/component/ets/folder_stack.d.ts b/api/@internal/component/ets/folder_stack.d.ts index 0c93809ea69c22d58fd3ab6a78022366d2dcddde..3755d672b2acab038d20e5d3b0fd738041dac052 100644 --- a/api/@internal/component/ets/folder_stack.d.ts +++ b/api/@internal/component/ets/folder_stack.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import window from '../../@ohos.window'; +import { FoldStatus, Alignment, AppRotation } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Import the WindowStatusType type object for onHoverStatusChange. * @@ -28,6 +34,17 @@ */ declare type WindowStatusType = import('../api/@ohos.window').default.WindowStatusType; +/** + * Import the WindowStatusType type object for onHoverStatusChange. + * + * @typedef { window.WindowStatusType } WindowStatusType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type WindowStatusType = window.WindowStatusType + /** * FolderStack constructor options. * @@ -35,7 +52,8 @@ declare type WindowStatusType = import('../api/@ohos.window').default.WindowStat * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FolderStackOptions { /** @@ -63,7 +81,8 @@ interface FolderStackOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ upperItems?: Array; } @@ -83,7 +102,8 @@ interface FolderStackOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FolderStackInterface { @@ -115,7 +135,8 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: FolderStackOptions): FolderStackAttribute; } @@ -127,7 +148,8 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface OnFoldStatusChangeInfo { /** @@ -155,7 +177,8 @@ interface OnFoldStatusChangeInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ foldStatus: FoldStatus } @@ -169,23 +192,24 @@ interface OnFoldStatusChangeInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => void; /** * Callback when onHoverStatusChange. - * + * * Anonymous Object Rectification * @typedef { function } OnHoverStatusChangeCallback * @param { HoverEventParam } param - hover event param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; -/** /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -197,7 +221,8 @@ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FolderStackAttribute extends CommonMethod { /** @@ -217,7 +242,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent(value: Alignment): FolderStackAttribute; @@ -249,7 +275,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFolderStateChange(callback: OnFoldStatusChangeCallback): FolderStackAttribute; @@ -271,7 +298,8 @@ declare class FolderStackAttribute extends CommonMethod { * @returns { FolderStackAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onHoverStatusChange(handler: OnHoverStatusChangeCallback): FolderStackAttribute; @@ -292,7 +320,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnimation(value: boolean): FolderStackAttribute; @@ -313,7 +342,8 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoHalfFold(value: boolean): FolderStackAttribute; } @@ -324,7 +354,8 @@ declare class FolderStackAttribute extends CommonMethod { * @interface HoverEventParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface HoverEventParam { /** @@ -333,7 +364,8 @@ declare interface HoverEventParam { * @type { FoldStatus } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ foldStatus: FoldStatus @@ -343,7 +375,8 @@ declare interface HoverEventParam { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHoverMode: boolean @@ -353,7 +386,8 @@ declare interface HoverEventParam { * @type { AppRotation } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appRotation: AppRotation @@ -363,7 +397,8 @@ declare interface HoverEventParam { * @type { WindowStatusType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowStatusType: WindowStatusType } diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index a0a4f51d1660d4a8b47e78dcabb4facfc9256c4a..5d42b855289e07baae829ebab540c41605a9ec48 100644 --- a/api/@internal/component/ets/form_component.d.ts +++ b/api/@internal/component/ets/form_component.d.ts @@ -17,14 +17,20 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod,Callback } from './common'; +import Want from '../../@ohos.app.ability.Want'; +import { Visibility } from './enums' +import { VoidCallback } from './units'; +/*** endif */ /** * Defines the FormDimension enum. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormDimension { /** @@ -32,36 +38,40 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_1_2, + Dimension_1_2 = 0, /** * 2 x 2 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_2, + Dimension_2_2 = 1, /** * 2 x 4 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_4, + Dimension_2_4 = 2, /** * 4 x 4 cards * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_4_4, + Dimension_4_4 = 3, /** * 2 x 1 cards @@ -69,6 +79,7 @@ declare enum FormDimension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @deprecated since 20 */ Dimension_2_1, @@ -78,7 +89,8 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_1_1 = 6, @@ -87,16 +99,18 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_6_4, + DIMENSION_6_4 = 7, /** * 2 x 3 cards used for wearable devices * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -105,18 +119,10 @@ declare enum FormDimension { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 - */ - DIMENSION_3_3 = 9, - - /** - * 3 x 4 cards used for tv devices - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_4 = 10, + DIMENSION_3_3 = 9 } /** @@ -125,7 +131,8 @@ declare enum FormDimension { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormRenderingMode { @@ -134,7 +141,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FULL_COLOR, @@ -143,7 +151,8 @@ declare enum FormRenderingMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE_COLOR, } @@ -154,7 +163,8 @@ declare enum FormRenderingMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FormShape { /** @@ -162,7 +172,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -171,7 +182,8 @@ declare enum FormShape { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE, } @@ -182,7 +194,8 @@ declare enum FormShape { * @interface FormInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FormInfo { /** @@ -191,7 +204,8 @@ declare interface FormInfo { * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: number | string; @@ -201,7 +215,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -211,7 +226,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bundle: string; @@ -221,7 +237,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ability: string; @@ -231,7 +248,8 @@ declare interface FormInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ module: string; @@ -241,7 +259,8 @@ declare interface FormInfo { * @type { ?FormDimension } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dimension?: FormDimension; @@ -251,7 +270,8 @@ declare interface FormInfo { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ temporary?: boolean; @@ -265,13 +285,25 @@ declare interface FormInfo { */ want?: import('../api/@ohos.app.ability.Want').default; + /** + * The want of the form. + * + * @type { ?Want } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + want?: Want; + /** * The renderingMode of the form. * * @type { ?FormRenderingMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingMode?: FormRenderingMode; @@ -281,9 +313,20 @@ declare interface FormInfo { * @type { ?FormShape } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: FormShape; + + /** + * Exempt app lock + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + exemptAppLock?: boolean; } /** @@ -292,7 +335,8 @@ declare interface FormInfo { * @interface FormComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormComponentInterface { /** @@ -338,7 +382,8 @@ interface FormComponentInterface { * @returns { FormComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (value: FormInfo): FormComponentAttribute; } @@ -349,7 +394,8 @@ interface FormComponentInterface { * @interface FormCallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormCallbackInfo { /** @@ -358,7 +404,8 @@ interface FormCallbackInfo { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -368,18 +415,19 @@ interface FormCallbackInfo { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ idString: string; } - /** * Defines the size of Form. * - * @typedef FormSize + * @interface FormSize * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FormSize { /** @@ -389,10 +437,10 @@ interface FormSize { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; - /** * The height of the form. * Anonymous Object Rectification @@ -400,7 +448,8 @@ interface FormSize { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -411,7 +460,8 @@ interface FormSize { * @typedef ErrorInformation * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ErrorInformation { /** @@ -421,7 +471,8 @@ interface ErrorInformation { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ errcode: number; @@ -432,7 +483,8 @@ interface ErrorInformation { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ msg: string; } @@ -441,7 +493,8 @@ interface ErrorInformation { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FormComponentAttribute extends CommonMethod { /** @@ -455,13 +508,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -542,13 +600,13 @@ declare class FormComponentAttribute extends CommonMethod } callback * @returns { FormComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: Callback): FormComponentAttribute; @@ -569,7 +627,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -589,7 +648,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -604,13 +664,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; } diff --git a/api/@internal/component/ets/form_link.d.ts b/api/@internal/component/ets/form_link.d.ts index 86479323501246859e6f83569e0ccbabde92fcf2..700211a7b821455ff4ea0cb067e6e741d61ad59c 100644 --- a/api/@internal/component/ets/form_link.d.ts +++ b/api/@internal/component/ets/form_link.d.ts @@ -17,7 +17,9 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Defines the FormLink options. * @@ -25,7 +27,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 10 -*/ + */ /** * Defines the FormLink options. * @@ -33,8 +35,9 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 -*/ + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ declare interface FormLinkOptions { /** * Action types: "router" and "message". @@ -51,7 +54,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ action: string; @@ -70,7 +74,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -89,7 +94,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; @@ -108,7 +114,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName?: string; @@ -119,7 +126,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ uri?: string; @@ -138,7 +146,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ params?: Object; } @@ -158,7 +167,8 @@ declare interface FormLinkOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormLinkInterface { /** @@ -178,7 +188,8 @@ interface FormLinkInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (options: FormLinkOptions): FormLinkAttribute; } @@ -198,10 +209,10 @@ interface FormLinkInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -declare class FormLinkAttribute extends CommonMethod { -} +declare class FormLinkAttribute extends CommonMethod {} /** * Defines FormLink component. diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 9b39da9c99f24917745844fb511e953d9b0e56c7..0d3ebe2d139d1a8d8a32a3f135911025f412f34c 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod,CommonConfiguration,ContentModifier,MultiShadowOptions,Optional } from './common' +import { CustomBuilder } from './builder' +import { ResourceStr,Dimension,ResourceColor,Length } from './units' +import { LinearGradient } from './dataPanel' +/*** endif */ + /** * Defines Gauge constructor options. * @@ -26,7 +33,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface GaugeOptions { /** @@ -72,7 +80,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value: number; @@ -119,7 +128,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ min?: number; @@ -166,7 +176,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ max?: number; } @@ -203,7 +214,8 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GaugeInterface { /** @@ -262,7 +274,8 @@ interface GaugeInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: GaugeOptions): GaugeAttribute; } @@ -284,7 +297,8 @@ interface GaugeInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeShadowOptions extends MultiShadowOptions {} @@ -303,7 +317,8 @@ declare interface GaugeShadowOptions extends MultiShadowOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeIndicatorOptions { @@ -324,7 +339,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -345,7 +361,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ space?: Dimension; } @@ -358,7 +375,8 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -368,7 +386,8 @@ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -458,7 +480,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value(value: number): GaugeAttribute; @@ -498,7 +521,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startAngle(angle: number): GaugeAttribute; @@ -538,7 +562,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endAngle(angle: number): GaugeAttribute; @@ -578,7 +603,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute; @@ -618,7 +644,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth(length: Length): GaugeAttribute; @@ -639,7 +666,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ description(value: CustomBuilder): GaugeAttribute; @@ -660,7 +688,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackShadow(value: GaugeShadowOptions): GaugeAttribute; @@ -681,7 +710,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicator(value: GaugeIndicatorOptions): GaugeAttribute; @@ -694,7 +724,8 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(isPrivacySensitiveMode: Optional): GaugeAttribute; @@ -706,7 +737,8 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): GaugeAttribute; } diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index 464be9eddb6335b1ceb7b5d579eca77e1f18d81c..5f6f279b39cb8ecb6b240e59121b5ebce5175a50 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { BaseEvent, SourceTool, Callback } from './common' +import { InteractionHand } from './enums' +/*** endif */ + /** * Creating an Object * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PanDirection { /** @@ -62,7 +68,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -85,7 +92,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, @@ -108,7 +116,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -131,7 +140,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -154,7 +164,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -177,7 +188,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Up, @@ -200,7 +212,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Down, @@ -223,7 +236,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, } @@ -250,7 +264,8 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeDirection { /** @@ -272,7 +287,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -295,7 +311,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, @@ -318,7 +335,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -341,7 +359,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ All, } @@ -368,7 +387,8 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureMode { /** @@ -390,7 +410,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Sequence, @@ -413,7 +434,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Parallel, @@ -436,7 +458,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Exclusive, } @@ -463,7 +486,8 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureMask { /** @@ -485,7 +509,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -508,7 +533,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IgnoreInternal, } @@ -528,7 +554,8 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureJudgeResult { /** @@ -544,7 +571,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTINUE = 0, @@ -561,7 +589,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REJECT = 1, } @@ -581,7 +610,8 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace GestureControl { /** @@ -599,7 +629,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum GestureType { /** @@ -615,7 +646,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TAP_GESTURE = 0, @@ -632,7 +664,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS_GESTURE = 1, @@ -649,7 +682,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PAN_GESTURE = 2, @@ -666,7 +700,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PINCH_GESTURE = 3, @@ -683,7 +718,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_GESTURE = 4, @@ -700,7 +736,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_GESTURE = 5, @@ -717,7 +754,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DRAG = 6, @@ -734,7 +772,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLICK = 7, } @@ -755,7 +794,8 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureInfo { /** @@ -773,7 +813,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tag?: string; @@ -792,7 +833,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: GestureControl.GestureType; @@ -811,7 +853,8 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isSystemGesture: boolean; } @@ -915,7 +958,8 @@ declare interface EventLocationInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface FingerInfo { /** @@ -940,7 +984,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -988,7 +1033,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalX: number; @@ -1014,7 +1060,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalY: number; @@ -1040,7 +1087,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ localX: number; @@ -1066,7 +1114,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ localY: number; @@ -1077,7 +1126,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayX: number; @@ -1088,7 +1138,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ displayY: number; @@ -1099,7 +1150,8 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ hand?: InteractionHand; } @@ -1137,6 +1189,18 @@ declare type GestureType = | RotationGestureInterface | GestureGroupInterface; +/** + * Defines the Gesture Type. + * + * @typedef { Gesture | GestureGroup } GestureType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type GestureType = Gesture | GestureGroup; + /** * Defines the gesture base event. * @@ -1154,7 +1218,8 @@ declare type GestureType = * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface BaseGestureEvent extends BaseEvent { /** @@ -1172,7 +1237,8 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingerList: FingerInfo[]; @@ -1206,7 +1272,8 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TapGestureEvent extends BaseGestureEvent { /** @@ -1238,7 +1305,8 @@ interface TapGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LongPressGestureEvent extends BaseGestureEvent { /** @@ -1256,7 +1324,8 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ repeat: boolean; } @@ -1278,7 +1347,8 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PanGestureEvent extends BaseGestureEvent { /** @@ -1298,7 +1368,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX: number; @@ -1319,7 +1390,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY: number; @@ -1336,7 +1408,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocityX: number; @@ -1353,7 +1426,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocityY: number; @@ -1370,7 +1444,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } @@ -1392,7 +1467,8 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PinchGestureEvent extends BaseGestureEvent { /** @@ -1410,7 +1486,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: number; @@ -1431,7 +1508,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterX: number; @@ -1452,7 +1530,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterY: number; } @@ -1474,7 +1553,8 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RotationGestureEvent extends BaseGestureEvent { /** @@ -1494,7 +1574,8 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; } @@ -1516,7 +1597,8 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwipeGestureEvent extends BaseGestureEvent { /** @@ -1536,7 +1618,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; @@ -1557,7 +1640,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ speed: number; } @@ -1587,7 +1671,8 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GestureEvent extends BaseEvent { /** @@ -1615,7 +1700,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ repeat: boolean; @@ -1644,7 +1730,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fingerList: FingerInfo[]; @@ -1688,7 +1775,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX: number; @@ -1720,7 +1808,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY: number; @@ -1752,7 +1841,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number; @@ -1784,7 +1874,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ speed: number; @@ -1813,7 +1904,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale: number; @@ -1845,7 +1937,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterX: number; @@ -1877,7 +1970,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pinchCenterY: number; @@ -1894,7 +1988,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocityX: number; @@ -1911,7 +2006,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocityY: number; @@ -1928,7 +2024,8 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; @@ -1985,7 +2082,8 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface BaseHandlerOptions { /** @@ -1996,11 +2094,49 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isFingerCountLimited?: boolean; } +/** + * Defines Gesture interface. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export declare class Gesture { + /** + * Set gesture's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + tag(tag: string): this; + + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + allowedTypes(types: Array): this; +} + /** * Defines TapGesture parameters. * @@ -2018,17 +2154,19 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TapGestureParameters extends BaseHandlerOptions { /** - * Number of consecutive clicks recognized. If the value is less than 1, the default value is used. + * Number of consecutive clicks recognized. If the value is less than 1 or null, the default value is used. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ count?: number; /** @@ -2038,7 +2176,8 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -2048,7 +2187,8 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ distanceThreshold?: number; } @@ -2157,6 +2297,46 @@ interface TapGestureInterface extends GestureInterface { onAction(event: (event: GestureEvent) => void): TapGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines TapGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class TapGesture extends Gesture { + /** + * Set the value. + * TapGestureParameters: The parameters of the tapGesture. + * + * @param { function } factory + * @param { TapGestureParameters } value + * @returns { TapGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => TapGesture, value?: TapGestureParameters): TapGesture + + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines LongPressGesture interface. * @@ -2334,6 +2514,72 @@ interface LongPressGestureInterface extends GestureInterface): LongPressGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines LongPressGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class LongPressGesture extends Gesture { + /** + * Set the value. + * fingers: Indicates the hand index that triggers the long press. + * repeat: Indicates whether to trigger event callback continuously. + * duration: Minimum press and hold time, in milliseconds. + * + * @param { function } factory + * @param { LongPressGestureHandlerOptions } value + * @returns { LongPressGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => LongPressGesture, value?: LongPressGestureHandlerOptions): LongPressGesture + + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; + + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the PanGesture options. * @@ -2353,7 +2599,8 @@ interface LongPressGestureInterface extends GestureInterface { /** * Set the value. + * fingers: Indicates the hand index that triggers the pangesture. + * direction: Indicates the direction that triggers the pangesture. + * distance: Indicates the distance that triggers the pangesture. * * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value * @returns { PanGestureInterface } @@ -2521,6 +2821,9 @@ interface PanGestureInterface extends GestureInterface { */ /** * Set the value. + * fingers: Indicates the hand index that triggers the pangesture. + * direction: Indicates the direction that triggers the pangesture. + * distance: Indicates the distance that triggers the pangesture. * * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value * @returns { PanGestureInterface } @@ -2530,6 +2833,9 @@ interface PanGestureInterface extends GestureInterface { */ /** * Set the value. + * fingers: Indicates the hand index that triggers the pangesture. + * direction: Indicates the direction that triggers the pangesture. + * distance: Indicates the distance that triggers the pangesture. * * @param { { fingers?: number; direction?: PanDirection; distance?: number } | PanGestureOptions } value * @returns { PanGestureInterface } @@ -2681,27 +2987,102 @@ interface PanGestureInterface extends GestureInterface { } +/*** if arkts 1.2 */ /** - * Defines the SwipeGesture interface. - * - * @extends GestureInterface - * @interface SwipeGestureInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the SwipeGesture interface. + * Defines PanGesture. * - * @extends GestureInterface - * @interface SwipeGestureInterface + * @extends Gesture * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @atomicservice + * @since 20 */ -/** - * Defines SwipeGesture interface extends GestureInterface. - * - * @extends GestureInterface +export declare class PanGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PanGestureHandlerOptions | PanGestureOptions } value + * @returns { PanGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => PanGesture, value?: PanGestureHandlerOptions | PanGestureOptions): PanGesture + + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + +/** + * Defines the SwipeGesture interface. + * + * @extends GestureInterface + * @interface SwipeGestureInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the SwipeGesture interface. + * + * @extends GestureInterface + * @interface SwipeGestureInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ +/** + * Defines SwipeGesture interface extends GestureInterface. + * + * @extends GestureInterface * @interface SwipeGestureInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2711,6 +3092,9 @@ interface PanGestureInterface extends GestureInterface { interface SwipeGestureInterface extends GestureInterface { /** * Set the value. + * fingers: Indicates the hand index that triggers the swipegesture. + * direction: Indicates the direction that triggers the swipegesture. + * speed: Indicates the speed that triggers the swipegesture. * * @param { object } value * @returns { SwipeGestureInterface } @@ -2719,6 +3103,9 @@ interface SwipeGestureInterface extends GestureInterface */ /** * Set the value. + * fingers: Indicates the hand index that triggers the swipegesture. + * direction: Indicates the direction that triggers the swipegesture. + * speed: Indicates the speed that triggers the swipegesture. * * @param { object } value * @returns { SwipeGestureInterface } @@ -2728,6 +3115,9 @@ interface SwipeGestureInterface extends GestureInterface */ /** * Set the value. + * fingers: Indicates the hand index that triggers the swipegesture. + * direction: Indicates the direction that triggers the swipegesture. + * speed: Indicates the speed that triggers the swipegesture. * * @param { object } value * @returns { SwipeGestureInterface } @@ -2781,6 +3171,45 @@ interface SwipeGestureInterface extends GestureInterface onAction(event: (event: GestureEvent) => void): SwipeGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines SwipeGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class SwipeGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { SwipeGestureHandlerOptions } value + * @returns { SwipeGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => SwipeGesture, value?: SwipeGestureHandlerOptions): SwipeGesture + + /** + * Slide gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the PinchGesture interface. * @@ -2811,6 +3240,8 @@ interface SwipeGestureInterface extends GestureInterface interface PinchGestureInterface extends GestureInterface { /** * Set the value. + * fingers: Indicates the hand index that triggers the pinchgesture. + * direction: Indicates the direction that triggers the pinchgesture. * * @param { object } value * @returns { PinchGestureInterface } @@ -2819,6 +3250,8 @@ interface PinchGestureInterface extends GestureInterface */ /** * Set the value. + * fingers: Indicates the hand index that triggers the pinchgesture. + * direction: Indicates the direction that triggers the pinchgesture. * * @param { object } value * @returns { PinchGestureInterface } @@ -2828,6 +3261,8 @@ interface PinchGestureInterface extends GestureInterface */ /** * Set the value. + * fingers: Indicates the hand index that triggers the pinchgesture. + * direction: Indicates the direction that triggers the pinchgesture. * * @param { object } value * @returns { PinchGestureInterface } @@ -2979,6 +3414,81 @@ interface PinchGestureInterface extends GestureInterface onActionCancel(event: Callback): PinchGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines PinchGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class PinchGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { PinchGestureHandlerOptions } value + * @returns { PinchGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => PinchGesture, value?: PinchGestureHandlerOptions): PinchGesture + + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the RotationGesture interface. * @@ -3009,6 +3519,8 @@ interface PinchGestureInterface extends GestureInterface interface RotationGestureInterface extends GestureInterface { /** * Set the value. + * fingers: Indicates the hand index that triggers the rotationgesture. + * angle: Indicates the angle that triggers the rotationgesture. * * @param { object } value * @returns { RotationGestureInterface } @@ -3017,6 +3529,8 @@ interface RotationGestureInterface extends GestureInterface): RotationGestureInterface; } +/*** if arkts 1.2 */ +/** + * Defines RotationGesture. + * + * @extends Gesture + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class RotationGesture extends Gesture { + /** + * Set the value. + * + * @param { function } factory + * @param { RotationGestureHandlerOptions } value + * @returns { RotationGesture } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => RotationGesture, value?: RotationGestureHandlerOptions): RotationGesture + + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the GestureGroup interface. * @@ -3264,6 +3855,45 @@ interface GestureGroupInterface { onCancel(event: () => void): GestureGroupInterface; } +/*** if arkts 1.2 */ +/** + * Defines the GestureGroup. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureGroup { + /** + * Return to Obtain GestureGroup. + * + * @param { function } factory + * @param { GestureMode } mode + * @param { GestureType[] } gesture + * @returns { GestureGroup } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_instantiate(factory: () => GestureGroup, mode: GestureMode, ...gesture: GestureType[]): GestureGroup; + + /** + * The Gesture group is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { GestureGroup } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel(event: Callback): GestureGroup; +} +/*** endif */ + /** * Defines TapGesture Component. * @@ -3460,6 +4090,42 @@ declare class GestureHandler implements GestureInterface { allowedTypes(types: Array): T; } +/*** if arkts 1.2 */ +/** + * Defines the gesture handler. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureHandler { + /** + * Set the GestureHandler's tag. + * + * @param { string } tag + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + tag(tag: string): this; + + /** + * Input source type for gesture response. + * + * @param { Array } types - indicate the allowed input source for gesture to response + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + allowedTypes(types: Array): this; +} +/*** endif */ + /** * Defines the TapGestureHandler options. * @@ -3477,7 +4143,8 @@ declare class GestureHandler implements GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface TapGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3488,7 +4155,8 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ count?: number; /** @@ -3499,7 +4167,8 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; } @@ -3537,6 +4206,41 @@ declare class TapGestureHandler extends GestureHandler { onAction(event: Callback): TapGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the TapGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class TapGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { TapGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: TapGestureHandlerOptions); + /** + * Tap gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the LongPressGestureHandler options. * @@ -3554,7 +4258,8 @@ declare class TapGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3565,7 +4270,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3576,7 +4282,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ repeat?: boolean; /** @@ -3587,7 +4294,8 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -3659,6 +4367,63 @@ declare class LongPressGestureHandler extends GestureHandler): LongPressGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the LongPressGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class LongPressGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { LongPressGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: LongPressGestureHandlerOptions); + /** + * LongPress gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; + /** + * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the PanGestureHandler options. * @@ -3676,7 +4441,8 @@ declare class LongPressGestureHandler extends GestureHandler + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ +declare class PanGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PanGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + constructor(options?: PanGestureHandlerOptions); + /** + * Pan gesture recognition success callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionStart(event: Callback): PanGestureHandler; + /** + * Callback when the Pan gesture is moving. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionUpdate(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionEnd(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onActionCancel(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onActionCancel(event: Callback): PanGestureHandler; +} + +/*** if arkts 1.2 */ +/** + * Defines the PanGesture handler. + * + * @extends GestureHandler * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ -declare class PanGestureHandler extends GestureHandler { +export declare class PanGestureHandler extends GestureHandler { /** * Constructor parameters. * @@ -3741,66 +4589,55 @@ declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ constructor(options?: PanGestureHandlerOptions); /** * Pan gesture recognition success callback. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionStart(event: Callback): PanGestureHandler; + onActionStart(event: Callback): this; /** * Callback when the Pan gesture is moving. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionUpdate(event: Callback): PanGestureHandler; + onActionUpdate(event: Callback): this; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 */ - onActionCancel(event: Callback): PanGestureHandler; + onActionEnd(event: Callback): this; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. * * @param { Callback } event - * @returns { PanGestureHandler } + * @returns { this } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ - onActionCancel(event: Callback): PanGestureHandler; + onActionCancel(event: Callback): this; } +/*** endif */ /** * Defines the SwipeGestureHandler options. @@ -3819,7 +4656,8 @@ declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3830,7 +4668,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3841,7 +4680,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: SwipeDirection; /** @@ -3852,7 +4692,8 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ speed?: number; } @@ -3890,6 +4731,41 @@ declare class SwipeGestureHandler extends GestureHandler { onAction(event: Callback): SwipeGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the SwipeGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class SwipeGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { SwipeGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: SwipeGestureHandlerOptions); + /** + * Swipe gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAction(event: Callback): this; +} +/*** endif */ + /** * Defines the PinchGestureHandler options. * @@ -3907,7 +4783,8 @@ declare class SwipeGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface PinchGestureHandlerOptions extends BaseHandlerOptions { /** @@ -3918,7 +4795,8 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -3929,7 +4807,8 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ distance?: number; } @@ -4012,6 +4891,74 @@ declare class PinchGestureHandler extends GestureHandler { onActionCancel(event: Callback): PinchGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the PinchGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class PinchGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { PinchGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: PinchGestureHandlerOptions); + /** + * Pinch gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Pinch gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the RotationGestureHandler options. * @@ -4029,7 +4976,8 @@ declare class PinchGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface RotationGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4040,7 +4988,8 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fingers?: number; /** @@ -4051,7 +5000,8 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle?: number; } @@ -4134,6 +5084,74 @@ declare class RotationGestureHandler extends GestureHandler): RotationGestureHandler; } +/*** if arkts 1.2 */ +/** + * Defines the RotationGesture handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class RotationGestureHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { RotationGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: RotationGestureHandlerOptions); + /** + * Rotation gesture recognition success callback. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionStart(event: Callback): this; + /** + * Callback when the Rotation gesture is moving. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionUpdate(event: Callback): this; + /** + * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionEnd(event: Callback): this; + /** + * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onActionCancel(event: Callback): this; +} +/*** endif */ + /** * Defines the GestureGroupGestureHandler options. * @@ -4141,7 +5159,8 @@ declare class RotationGestureHandler extends GestureHandler[]; + /** + * Indicates the gestures included in the gesture group. + * + * @type { GestureHandler[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + gestures: GestureHandler[]; } /** @@ -4199,6 +5230,41 @@ declare class GestureGroupHandler extends GestureHandler { onCancel(event: Callback): GestureGroupHandler; } +/*** if arkts 1.2 */ +/** + * Defines the GestureGroup handler. + * + * @extends GestureHandler + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare class GestureGroupHandler extends GestureHandler { + /** + * Constructor parameters. + * + * @param { GestureGroupGestureHandlerOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(options?: GestureGroupGestureHandlerOptions); + /** + * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel(event: Callback): this; +} +/*** endif */ + /** * Creating an Object * @@ -4206,7 +5272,8 @@ declare class GestureGroupHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GesturePriority { /** @@ -4215,7 +5282,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, /** @@ -4224,7 +5292,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIORITY = 1, } @@ -4236,7 +5305,8 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GestureRecognizerState { /** @@ -4245,7 +5315,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ READY = 0, /** @@ -4254,7 +5325,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DETECTING = 1, /** @@ -4263,7 +5335,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PENDING = 2, /** @@ -4272,7 +5345,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BLOCKED = 3, /** @@ -4281,7 +5355,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESSFUL = 4, /** @@ -4290,7 +5365,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAILED = 5, } @@ -4302,7 +5378,8 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollableTargetInfo extends EventTargetInfo { /** @@ -4312,7 +5389,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isBegin(): boolean; /** @@ -4322,7 +5400,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnd(): boolean; } @@ -4333,7 +5412,8 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class EventTargetInfo { /** @@ -4343,7 +5423,8 @@ declare class EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getId(): string; } @@ -4384,7 +5465,8 @@ declare class TouchRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GestureRecognizer { /** @@ -4394,7 +5476,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTag(): string; /** @@ -4404,7 +5487,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getType(): GestureControl.GestureType; /** @@ -4414,7 +5498,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isBuiltIn(): boolean; /** @@ -4424,7 +5509,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setEnabled(isEnabled: boolean): void; /** @@ -4434,7 +5520,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnabled(): boolean; /** @@ -4444,7 +5531,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getState(): GestureRecognizerState; /** @@ -4454,7 +5542,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getEventTargetInfo(): EventTargetInfo; /** @@ -4463,7 +5552,8 @@ declare class GestureRecognizer { * @returns { boolean } - true is valid, false is invalid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isValid(): boolean; /** @@ -4473,7 +5563,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getFingerCount(): number; /** @@ -4483,7 +5574,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isFingerCountLimit(): boolean; /** @@ -4510,7 +5602,8 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TapRecognizer extends GestureRecognizer { /** @@ -4520,7 +5613,8 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getTapCount(): number; } @@ -4532,7 +5626,8 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LongPressRecognizer extends GestureRecognizer { /** @@ -4542,7 +5637,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isRepeat(): boolean; /** @@ -4553,7 +5649,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDuration(): number; } @@ -4565,7 +5662,8 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwipeRecognizer extends GestureRecognizer { /** @@ -4576,7 +5674,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getVelocityThreshold(): number; /** @@ -4586,7 +5685,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDirection(): SwipeDirection; } @@ -4598,7 +5698,8 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PinchRecognizer extends GestureRecognizer { /** @@ -4609,7 +5710,8 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getDistance(): number; } @@ -4621,7 +5723,8 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RotationRecognizer extends GestureRecognizer { /** @@ -4631,7 +5734,8 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAngle(): number; } @@ -4643,7 +5747,8 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PanRecognizer extends GestureRecognizer { /** @@ -4653,7 +5758,8 @@ declare class PanRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPanGestureOptions(): PanGestureOptions; /** diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index 4ff5042993145c4d84caed5cd110a14f8e69a847..c6bda2eaae02761c49d8d7f0222a22ae011c5f1a 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { EdgeEffectOptions, NestedScrollOptions, ItemDragInfo, ScrollableCommonMethod, Optional, CommonMethod, OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; +import { Length, Resource } from './units'; +import { Scroller, OnScrollFrameBeginCallback } from './scroll'; +import { ScrollState } from './list'; +import { BarState, Color, EdgeEffect } from './enums'; +/*** endif */ + /** * The options to help grid layout * @@ -33,7 +41,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridLayoutOptions { /** @@ -51,7 +60,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ regularSize: [number, number]; @@ -72,7 +82,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ irregularIndexes?: number[]; @@ -93,7 +104,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onGetIrregularSizeByIndex?: (index: number) => [number, number] @@ -114,7 +126,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGetRectByIndex?: (index: number) => [number, number, number, number] } @@ -141,7 +154,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridInterface { /** @@ -171,7 +185,8 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (scroller?: Scroller, layoutOptions?: GridLayoutOptions): GridAttribute; } @@ -198,7 +213,8 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridDirection { /** @@ -220,7 +236,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -243,7 +260,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Column, @@ -266,7 +284,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, @@ -289,7 +308,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ColumnReverse, } @@ -301,7 +321,8 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridItemAlignment { @@ -311,7 +332,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -322,7 +344,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH = 1, } @@ -342,7 +365,8 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ComputedBarAttribute { /** @@ -360,7 +384,8 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ totalOffset: number; @@ -379,7 +404,8 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ totalLength: number; } @@ -465,7 +491,8 @@ declare type OnGridScrollIndexCallback = (first: number, last: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridAttribute extends ScrollableCommonMethod { /** @@ -493,7 +520,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsTemplate(value: string): GridAttribute; @@ -522,7 +550,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsTemplate(value: string): GridAttribute; @@ -551,7 +580,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap(value: Length): GridAttribute; @@ -580,7 +610,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap(value: Length): GridAttribute; @@ -692,7 +723,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollBarUpdate(event: (index: number, offset: number) => ComputedBarAttribute): GridAttribute; @@ -726,7 +758,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollIndex(event: (first: number, last: number) => void): GridAttribute; @@ -755,7 +788,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): GridAttribute; @@ -767,7 +801,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, show: boolean): GridAttribute; @@ -796,7 +831,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ editMode(value: boolean): GridAttribute; @@ -825,7 +861,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiSelectable(value: boolean): GridAttribute; @@ -854,7 +891,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxCount(value: number): GridAttribute; @@ -883,7 +921,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minCount(value: number): GridAttribute; @@ -912,7 +951,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cellLength(value: number): GridAttribute; @@ -941,7 +981,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutDirection(value: GridDirection): GridAttribute; @@ -970,7 +1011,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ supportAnimation(value: boolean): GridAttribute; @@ -1006,6 +1048,19 @@ declare class GridAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): GridAttribute; + /** + * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. + * (To be triggered, press and hold for 170 milliseconds (ms)) + * + * @param { OnItemDragStartCallback } event + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onItemDragStart(event: OnItemDragStartCallback): GridAttribute; + /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -1031,7 +1086,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute; @@ -1060,7 +1116,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute; @@ -1089,7 +1146,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute; @@ -1121,7 +1179,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDrop( event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void, @@ -1219,14 +1278,16 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(alignment: Optional): GridAttribute; - /** + /** * Sets the focus wrap mode of the grid. * * @param { Optional } mode - the focus wrap mode of the grid. + *
Default value: **FocusWrapMode.DEFAULT**. * @returns { GridAttribute } the attribute of the grid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1379,7 +1440,57 @@ declare class GridAttribute extends ScrollableCommonMethod { * @atomicservice * @since 11 */ - onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): GridAttribute; + /** + * Called when scrolling begin each frame. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { GridAttribute } Returns the instance of the GridAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): GridAttribute; + + /** + * Called when scrolling begin each frame. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { GridAttribute } Returns the instance of the GridAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): GridAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): GridAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { GridAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): GridAttribute; } /** diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index 3f6b51c3f778193238bf2c476fad04ca98b63068..bfb75483273e5d351dd0ad6c171063c4dbac34e1 100644 --- a/api/@internal/component/ets/gridItem.d.ts +++ b/api/@internal/component/ets/gridItem.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Bindable } from './common' +/*** endif */ + /** * Defines the grid item style. * @@ -33,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridItemStyle { /** @@ -49,7 +54,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -66,7 +72,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAIN = 1, } @@ -86,7 +93,8 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridItemOptions { /** @@ -104,7 +112,8 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: GridItemStyle; } @@ -131,7 +140,8 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridItemInterface { /** @@ -157,7 +167,8 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: GridItemOptions): GridItemAttribute; } @@ -178,7 +189,8 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridItemAttribute extends CommonMethod { /** @@ -206,7 +218,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowStart(value: number): GridItemAttribute; @@ -235,7 +248,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rowEnd(value: number): GridItemAttribute; @@ -264,7 +278,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnStart(value: number): GridItemAttribute; @@ -293,7 +308,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columnEnd(value: number): GridItemAttribute; @@ -333,7 +349,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectable(value: boolean): GridItemAttribute; @@ -360,6 +377,20 @@ declare class GridItemAttribute extends CommonMethod { */ selected(value: boolean): GridItemAttribute; + /** + * Called when judging whether it is selected. + * This parameter supports $$ for two-way binding of variables. + * + * @param { boolean | Bindable } value + * @returns { GridItemAttribute } the attribute of the gridItem. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected(value: boolean | Bindable): GridItemAttribute; + /** * Called when the gridItem is selected. * @@ -385,7 +416,8 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(event: (isSelected: boolean) => void): GridItemAttribute; } diff --git a/api/@internal/component/ets/grid_col.d.ts b/api/@internal/component/ets/grid_col.d.ts index 147401413a5d1d76e374d19dfaeaf91d95c34c91..5889c45d0dd67c30636031d705265532ac774f33 100644 --- a/api/@internal/component/ets/grid_col.d.ts +++ b/api/@internal/component/ets/grid_col.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the option in number unit of grid-container child component. * @@ -43,7 +47,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridColColumnOption { /** @@ -71,7 +76,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: number, @@ -100,7 +106,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number, @@ -129,7 +136,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number, @@ -158,7 +166,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number, @@ -187,7 +196,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: number, @@ -216,7 +226,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: number, } @@ -246,7 +257,8 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridColOptions { /** @@ -274,7 +286,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ span?: number | GridColColumnOption; @@ -303,7 +316,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number | GridColColumnOption; @@ -332,7 +346,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ order?: number | GridColColumnOption; } @@ -362,7 +377,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridColInterface { /** @@ -393,7 +409,8 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (option?: GridColOptions): GridColAttribute; } @@ -423,7 +440,8 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridColAttribute extends CommonMethod { /** @@ -454,7 +472,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ span(value: number | GridColColumnOption): GridColAttribute; @@ -486,7 +505,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gridColOffset(value: number | GridColColumnOption): GridColAttribute; @@ -518,7 +538,8 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ order(value: number | GridColColumnOption): GridColAttribute; } diff --git a/api/@internal/component/ets/grid_row.d.ts b/api/@internal/component/ets/grid_row.d.ts index beaa5ea7a4b6601bdcb8cbec1162a6161da24bed..a5ea02dc1072a3a5f2bb8f488f3e56806f6e395b 100644 --- a/api/@internal/component/ets/grid_row.d.ts +++ b/api/@internal/component/ets/grid_row.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ItemAlign } from './enums'; +import { CommonMethod } from './common'; +import { Length } from './units'; +/*** endif */ + /** * Defines the option in length unit of grid-row component. * @@ -43,7 +49,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowSizeOption { /** @@ -71,7 +78,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: Length, @@ -100,7 +108,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: Length, @@ -129,7 +138,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: Length, @@ -158,7 +168,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: Length, @@ -187,7 +198,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: Length, @@ -216,7 +228,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: Length, } @@ -246,7 +259,8 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowColumnOption { /** @@ -274,7 +288,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xs?: number, @@ -303,7 +318,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number, @@ -332,7 +348,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number, @@ -361,7 +378,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number, @@ -390,7 +408,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xl?: number, @@ -419,7 +438,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xxl?: number, } @@ -449,7 +469,8 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GutterOption { /** @@ -477,7 +498,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length | GridRowSizeOption, @@ -506,7 +528,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length | GridRowSizeOption } @@ -536,7 +559,8 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BreakpointsReference { /** @@ -561,7 +585,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ WindowSize, @@ -587,7 +612,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ComponentSize, } @@ -617,7 +643,8 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum GridRowDirection { /** @@ -642,7 +669,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Row, @@ -668,7 +696,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RowReverse, } @@ -698,7 +727,8 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BreakPoints { /** @@ -726,7 +756,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value?: Array, @@ -755,7 +786,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reference?: BreakpointsReference, } @@ -785,7 +817,8 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GridRowOptions { /** @@ -813,7 +846,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gutter?: Length | GutterOption; @@ -842,7 +876,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ columns?: number | GridRowColumnOption; @@ -871,7 +906,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ breakpoints?: BreakPoints; @@ -900,7 +936,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: GridRowDirection; } @@ -930,7 +967,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface GridRowInterface { /** @@ -961,7 +999,8 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (option?: GridRowOptions): GridRowAttribute; } @@ -991,7 +1030,8 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GridRowAttribute extends CommonMethod { /** @@ -1022,7 +1062,8 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute; @@ -1045,7 +1086,8 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(value: ItemAlign): GridRowAttribute; } diff --git a/api/@internal/component/ets/hyperlink.d.ts b/api/@internal/component/ets/hyperlink.d.ts old mode 100755 new mode 100644 index 416030a85662572826d024b0c73678b34261f1b3..19098e14e34b84d5f131d9cdf991a9a1e3f1d79d --- a/api/@internal/component/ets/hyperlink.d.ts +++ b/api/@internal/component/ets/hyperlink.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from './../../../api/global/resource' +import { CommonMethod } from './common' +import { Color } from './enums' +/*** endif */ + /** * Defines the hyperlink interface. * @@ -41,6 +47,7 @@ * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ interface HyperlinkInterface { /** @@ -78,6 +85,7 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ (address: string | Resource, content?: string | Resource): HyperlinkAttribute; } @@ -105,6 +113,7 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class HyperlinkAttribute extends CommonMethod { /** @@ -133,6 +142,7 @@ declare class HyperlinkAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ color(value: Color | number | string | Resource): HyperlinkAttribute; } diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 5be59d65489a3688252714a71e6ca14a314771b0..43097a46f0b1f3c2e4938cb26fa6286853360362 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import image from '../../@ohos.multimedia.image'; +import drawing from '../../@ohos.graphics.drawing'; +import matrix4 from '../../@ohos.matrix4' +import { BusinessError } from '../../@ohos.base'; +import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { ResourceStr, ResourceColor, ColorFilter, EdgeWidths, ColorMetrics } from './units'; +import { ImageFit, ImageRepeat, CopyOptions } from './enums'; +import { Resource } from '../../global/resource'; +import { CommonMethod, PointLightStyle, PixelMap } from './common'; +/*** endif */ + /** * Use the DrawableDescriptor class to get drawable image. * @@ -45,6 +58,18 @@ declare type DrawableDescriptor = import ('../api/@ohos.arkui.drawableDescriptor */ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').default.ColorFilter; +/** + * Import the DrawingColorFilter type object for image color filter setting. + * + * @typedef { drawing.ColorFilter } DrawingColorFilter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DrawingColorFilter = drawing.ColorFilter; + /** * Enumerates all the levels available for the image resolution quality. * @@ -53,7 +78,18 @@ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').defaul * @systemapi * @since 12 */ -declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; +declare type ResolutionQuality = import('../api/@ohos.multimedia.image').default.ResolutionQuality; + +/** + * Enumerates all the levels available for the image resolution quality. + * + * @typedef { image.ResolutionQuality } ResolutionQuality + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ +declare type ResolutionQuality = image.ResolutionQuality; /** * Lattice for dividing an image into grids. @@ -64,7 +100,19 @@ declare type ResolutionQuality = import('../api/@ohos.multimedia.image').defaul * @atomicservice * @since 12 */ -declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; +declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.Lattice; + +/** + * Lattice for dividing an image into grids. + * + * @typedef { drawing.Lattice } DrawingLattice + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type DrawingLattice = drawing.Lattice; /** * Object matrix used for setting image transformations. @@ -77,6 +125,18 @@ declare type DrawingLattice = import('../api/@ohos.graphics.drawing').default.L */ declare type ImageMatrix = import ('../api/@ohos.matrix4').default.Matrix4Transit; +/** + * Object matrix used for setting image transformations. + * + * @typedef { matrix4.Matrix4Transit } Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ImageMatrix = matrix4.Matrix4Transit; + /** * Business error in onError callback. * @@ -113,7 +173,8 @@ declare type BusinessError = import('../api/@ohos.base').BusinessError; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRenderMode { /** @@ -144,7 +205,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Original, @@ -176,7 +238,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Template, } @@ -189,7 +252,8 @@ declare enum ImageRenderMode { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageContent { /** @@ -199,7 +263,8 @@ declare enum ImageContent { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMPTY = 0, } @@ -208,7 +273,8 @@ declare enum ImageContent { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DynamicRangeMode { /** @@ -216,7 +282,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 0, @@ -225,7 +292,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTRAINT = 1, @@ -234,7 +302,8 @@ declare enum DynamicRangeMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 2, } @@ -263,24 +332,25 @@ declare enum DynamicRangeMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageInterpolation { /** - * Do not use interpolated image data. + * Nearest Neighbor Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Do not use interpolated image data. + * Nearest Neighbor Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Do not use interpolated image data. + * Nearest Neighbor Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -288,31 +358,32 @@ declare enum ImageInterpolation { * @since 10 */ /** - * Do not use interpolated image data. + * Nearest Neighbor Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, /** - * Low usage of interpolated image data. + * Bilinear Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Low usage of interpolated image data. + * Bilinear Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Low usage of interpolated image data. + * Bilinear Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -320,31 +391,32 @@ declare enum ImageInterpolation { * @since 10 */ /** - * Low usage of interpolated image data. + * Bilinear Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Low, /** - * Interpolated image data is used moderately. + * MipMap Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Interpolated image data is used moderately. + * MipMap Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Interpolated image data is used moderately. + * MipMap Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -352,31 +424,32 @@ declare enum ImageInterpolation { * @since 10 */ /** - * Interpolated image data is used moderately. + * MipMap Interpolation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Medium, /** - * High usage of interpolated image data may affect the speed of image rendering. + * Cubic interpolation offers the highest interpolation quality, but may impact image rendering speed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * High usage of interpolated image data may affect the speed of image rendering. + * Cubic interpolation offers the highest interpolation quality, but may impact image rendering speed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * High usage of interpolated image data may affect the speed of image rendering. + * Cubic interpolation offers the highest interpolation quality, but may impact image rendering speed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -384,13 +457,14 @@ declare enum ImageInterpolation { * @since 10 */ /** - * High usage of interpolated image data may affect the speed of image rendering. + * Cubic interpolation offers the highest interpolation quality, but may impact image rendering speed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ High, } @@ -400,7 +474,8 @@ declare enum ImageInterpolation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageRotateOrientation { /** @@ -409,7 +484,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -419,7 +495,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ UP = 1, @@ -429,7 +506,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 2, @@ -439,7 +517,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 3, @@ -449,7 +528,8 @@ declare enum ImageRotateOrientation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 4, @@ -460,6 +540,7 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ UP_MIRRORED = 5, @@ -470,6 +551,7 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ RIGHT_MIRRORED = 6, @@ -480,6 +562,7 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ DOWN_MIRRORED = 7, @@ -490,10 +573,135 @@ declare enum ImageRotateOrientation { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ LEFT_MIRRORED = 8, } +/** + * ImageCompleteEvent + * + * @interface ImageCompleteEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export interface ImageCompleteEvent { + /** + * The width of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width: number; + /** + * The height of the image source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height: number; + /** + * The width of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + componentWidth: number; + /** + * The height of the component source. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + componentHeight: number; + /** + * The value of the status of the image being loaded successfully. + * If the returned status value is 0, the image data is successfully loaded. + * If the returned status value is 1, the image is successfully decoded. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + loadingStatus: number; + /** + * The width of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentWidth: number; + /** + * The height of the picture that is actually drawn. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentHeight: number; + /** + * The actual draw is offset from the x-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentOffsetX: number; + /** + * The actual draw is offset from the y-axis of the component itself. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentOffsetY: number; +} + /** * @interface ImageInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -518,7 +726,8 @@ declare enum ImageRotateOrientation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageInterface { /** @@ -570,7 +779,8 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (src: PixelMap | ResourceStr | DrawableDescriptor | ImageContent): ImageAttribute; @@ -582,7 +792,8 @@ interface ImageInterface { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (src: PixelMap | ResourceStr | DrawableDescriptor, imageAIOptions: ImageAIOptions): ImageAttribute; } @@ -595,19 +806,20 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageSourceSize { /** - * Set width. + * Image decode width. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set width. + * Image decode width. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -615,7 +827,7 @@ interface ImageSourceSize { * @since 9 */ /** - * Set width. + * Image decode width. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -624,7 +836,7 @@ interface ImageSourceSize { * @since 10 */ /** - * Set width. + * Image decode width. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -634,7 +846,7 @@ interface ImageSourceSize { * @since 11 */ /** - * Set width. + * Image decode width. The unit of the number type is vp. * Anonymous Object Rectification. * * @type { number } @@ -642,19 +854,20 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; /** - * Set height. + * Image decode height. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set height. + * Image decode height. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -662,7 +875,7 @@ interface ImageSourceSize { * @since 9 */ /** - * Set height. + * Image decode height. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -671,7 +884,7 @@ interface ImageSourceSize { * @since 10 */ /** - * Set height. + * Image decode height. The unit of the number type is vp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -681,7 +894,7 @@ interface ImageSourceSize { * @since 11 */ /** - * Set height. + * Image decode height. The unit of the number type is vp. * Anonymous Object Rectification. * * @type { number } @@ -689,7 +902,8 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; } @@ -700,7 +914,8 @@ interface ImageSourceSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColorContent { /** @@ -712,7 +927,8 @@ declare class ColorContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly ORIGIN: ColorContent; } @@ -741,7 +957,8 @@ declare class ColorContent { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAttribute extends CommonMethod { /** @@ -788,14 +1005,15 @@ declare class ImageAttribute extends CommonMethod { *

NOTE: *
This attribute does not take effect when the parameter type of the component is AnimatedDrawableDescriptor. *

- * + * * @param { string | Resource | PixelMap } value - Placeholder image displayed during loading, Default value is null. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alt(value: string | Resource | PixelMap): ImageAttribute; @@ -839,7 +1057,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ matchTextDirection(value: boolean): ImageAttribute; @@ -883,7 +1102,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fitOriginalSize(value: boolean): ImageAttribute; @@ -930,7 +1150,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillColor(value: ResourceColor): ImageAttribute; @@ -949,7 +1170,8 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent): ImageAttribute; @@ -969,6 +1191,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent | ColorMetrics): ImageAttribute; @@ -1008,7 +1231,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): ImageAttribute; @@ -1020,7 +1244,8 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ imageMatrix(matrix: ImageMatrix): ImageAttribute; @@ -1065,7 +1290,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectRepeat(value: ImageRepeat): ImageAttribute; @@ -1111,7 +1337,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoResize(value: boolean): ImageAttribute; @@ -1157,7 +1384,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ renderMode(value: ImageRenderMode): ImageAttribute; @@ -1168,12 +1396,12 @@ declare class ImageAttribute extends CommonMethod { *
This attribute is not applicable to SVG images. *

* - * @param { DynamicRangeMode } value - Dynamic range of the image. - * @returns { ImageAttribute } Returns the instance of the ImageAttribute, Default value is - * dynamicRangeMode.Standard. + * @param { DynamicRangeMode } value - Dynamic range of the image, Default value is DynamicRangeMode.Standard. + * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dynamicRangeMode(value: DynamicRangeMode): ImageAttribute; @@ -1229,13 +1457,14 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interpolation(value: ImageInterpolation): ImageAttribute; /** * Specifies the picture decoding size. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * The original picture is decoded into a picture of a specified size. * * @param { object } value * @returns { ImageAttribute } @@ -1244,7 +1473,7 @@ declare class ImageAttribute extends CommonMethod { */ /** * Specifies the picture decoding size. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * The original picture is decoded into a picture of a specified size. * * @param { object } value * @returns { ImageAttribute } @@ -1254,7 +1483,7 @@ declare class ImageAttribute extends CommonMethod { */ /** * Specifies the picture decoding size. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * The original picture is decoded into a picture of a specified size. * * @param { object } value * @returns { ImageAttribute } @@ -1265,7 +1494,7 @@ declare class ImageAttribute extends CommonMethod { */ /** * Specifies the picture decoding size. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * The original picture is decoded into a picture of a specified size. * * @param { object } value * @returns { ImageAttribute } @@ -1277,7 +1506,7 @@ declare class ImageAttribute extends CommonMethod { */ /** * Sets the decoding size of the image. - * The original picture is decoded into a picture of a specified size. The unit of the number type is px. + * The original picture is decoded into a picture of a specified size. * Anonymous Object Rectification. * *

NOTE: @@ -1292,7 +1521,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sourceSize(value: ImageSourceSize): ImageAttribute; @@ -1339,7 +1569,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad(value: boolean): ImageAttribute; @@ -1386,7 +1617,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter(value: ColorFilter | DrawingColorFilter): ImageAttribute; @@ -1423,7 +1655,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): ImageAttribute; @@ -1449,16 +1682,13 @@ declare class ImageAttribute extends CommonMethod { /** * Specifies whether the image is draggable. * - *

NOTE: - *
This attribute cannot be used together with the onDragStart event. - *

- * * @param { boolean } value - Whether the image is draggable, Default value is true. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): ImageAttribute; @@ -1469,7 +1699,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): ImageAttribute; @@ -1482,7 +1713,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } The attribute of the image. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeAntialiasing(value: number): ImageAttribute; @@ -1800,6 +2032,21 @@ declare class ImageAttribute extends CommonMethod { }) => void, ): ImageAttribute; + /** + * This callback is triggered when an image is successfully loaded. + * The size of the image source that is successfully loaded is returned, in pixels. + * + * @param { ImageOnCompleteCallback } callback + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onComplete(callback: ImageOnCompleteCallback): ImageAttribute; + /** * This callback is triggered when an exception occurs during image loading. * The field of "message" carries the detailed information of failed image loading. @@ -1835,7 +2082,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: ImageErrorCallback): ImageAttribute; @@ -1884,7 +2132,8 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): ImageAttribute; @@ -1918,7 +2167,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): ImageAttribute; @@ -1929,7 +2179,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ analyzerConfig(config: ImageAnalyzerConfig): ImageAttribute; @@ -1960,10 +2211,23 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resizable(value: ResizableOptions): ImageAttribute; + /** + * Set the quality enhancement level of image. + * + * @param { ResolutionQuality } imageQuality + * @returns { ImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; + /** * Sets whether to secure sensitive information on widgets. * @@ -1976,33 +2240,37 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(supported: boolean): ImageAttribute; /** - * Set the quality enhancement level of image. + * Sets the display orientation of the image content. * - * @param { ResolutionQuality } imageQuality + * @param { ImageRotateOrientation } orientation - Display orientation of the image content, Default value + * is ImageRotateOrientation.UP. * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; + orientation(orientation: ImageRotateOrientation) : ImageAttribute; /** - * Sets the display orientation of the image content. + * Set the range of SVG parsing capabilities supported through enable switch. * - * @param { ImageRotateOrientation } orientation - Display orientation of the image content, Default value - * is ImageRotateOrientation.UP. + * @param { boolean } enable - switch * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since 14 + * @since 21 */ - orientation(orientation: ImageRotateOrientation) : ImageAttribute; + supportSvg2(enable: boolean) : ImageAttribute; } /** @@ -2038,7 +2306,7 @@ declare class ImageAttribute extends CommonMethod { * *

If image loading takes a long time, follow the steps in [Reducing the Loading Time of Preset Images]{@link * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-texture-compression-improve-performance}

- * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -2099,10 +2367,25 @@ declare const ImageInstance: ImageAttribute; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type ImageErrorCallback = (error: ImageError) => void; +/** + * ImageOnCompleteCallback + * + * @typedef { function } ImageOnCompleteCallback + * @param { ImageCompleteEvent } loadEvent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type ImageOnCompleteCallback = (loadEvent?: ImageCompleteEvent) => void; + /** * @interface ImageError * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2122,7 +2405,8 @@ type ImageErrorCallback = (error: ImageError) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageError { /** @@ -2150,7 +2434,8 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ componentWidth: number; @@ -2179,7 +2464,8 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ componentHeight: number; @@ -2200,9 +2486,10 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - message: string + message: string; /** * Business Error. @@ -2213,6 +2500,7 @@ declare interface ImageError { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ error?: BusinessError; } @@ -2232,7 +2520,8 @@ declare interface ImageError { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ResizableOptions { /** @@ -2250,7 +2539,8 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slice?: EdgeWidths; @@ -2261,7 +2551,8 @@ declare interface ResizableOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lattice?: DrawingLattice; } diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index 16dd7ce744de4be1e7bad47763fc91e4e4228d04..b5ff09d1f9f7e96d967d4320b6aede06773ded92 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from "../../global/resource"; +import { CommonMethod, PixelMap } from './common' +import { AnimationStatus,FillMode } from './enums' +/*** endif */ + /** * Defines the ImageAnimator Interface. * @@ -42,7 +48,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageAnimatorInterface { /** @@ -69,7 +76,8 @@ interface ImageAnimatorInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): ImageAnimatorAttribute; } @@ -98,7 +106,8 @@ interface ImageAnimatorInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageFrameInfo { /** @@ -142,7 +151,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ src: string | Resource | PixelMap; /** @@ -169,7 +179,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number | string; /** @@ -196,7 +207,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number | string; /** @@ -223,7 +235,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: number | string; /** @@ -250,7 +263,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: number | string; /** @@ -275,7 +289,8 @@ interface ImageFrameInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -304,7 +319,8 @@ interface ImageFrameInfo { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAnimatorAttribute extends CommonMethod { /** @@ -332,13 +348,14 @@ declare class ImageAnimatorAttribute extends CommonMethodDynamic update is not supported. *

* - * @param { Array } value - Image frame informatio, Default value is []. + * @param { Array } value - Image frame information, Default value is []. * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ images(value: Array): ImageAnimatorAttribute; @@ -369,7 +386,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -617,7 +642,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -646,7 +672,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -677,7 +704,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -708,7 +736,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; } diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index ad4c5d95770ca982a9dbbbc1b788ace434892222..7415991b1a970aabdba46f343a33f201a59f309c 100644 --- a/api/@internal/component/ets/image_common.d.ts +++ b/api/@internal/component/ets/image_common.d.ts @@ -24,7 +24,8 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageAnalyzerType { /** @@ -32,7 +33,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT = 0, @@ -41,7 +43,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT, @@ -50,7 +53,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OBJECT_LOOKUP, } @@ -60,7 +64,8 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAnalyzerController { /** @@ -68,7 +73,8 @@ declare class ImageAnalyzerController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -78,7 +84,8 @@ declare class ImageAnalyzerController { * @returns { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; } @@ -89,7 +96,8 @@ declare class ImageAnalyzerController { * @interface ImageAnalyzerConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAnalyzerConfig { /** @@ -98,7 +106,8 @@ declare interface ImageAnalyzerConfig { * @type { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types: ImageAnalyzerType[]; } @@ -109,7 +118,8 @@ declare interface ImageAnalyzerConfig { * @interface ImageAIOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAIOptions { /** @@ -118,7 +128,8 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types?: ImageAnalyzerType[]; @@ -128,7 +139,8 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aiController?: ImageAnalyzerController; } \ No newline at end of file diff --git a/api/@internal/component/ets/image_span.d.ts b/api/@internal/component/ets/image_span.d.ts index 40109b352aff809c0bbcaec6101689cdf5ef2e42..3bce91cbbca0dbd9cd51514addd6172d423cc404 100644 --- a/api/@internal/component/ets/image_span.d.ts +++ b/api/@internal/component/ets/image_span.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceStr, ColorFilter} from './units'; +import { BaseSpan } from './span'; +import { ImageSpanAlignment, ImageFit } from './enums'; +import { ImageErrorCallback } from './image'; +import { PixelMap } from './common'; +import image from '../../@ohos.multimedia.image'; +/*** endif */ + /** * Provide image decoration in the text component. * @@ -33,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageSpanInterface { /** @@ -53,7 +63,8 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: ResourceStr | PixelMap): ImageSpanAttribute; } @@ -73,7 +84,8 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageSpanAttribute extends BaseSpan { /** @@ -93,7 +105,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; @@ -126,7 +139,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): ImageSpanAttribute; @@ -139,7 +153,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onComplete(callback: ImageCompleteCallback): ImageSpanAttribute; @@ -152,7 +167,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onError(callback: ImageErrorCallback): ImageSpanAttribute; @@ -163,7 +179,8 @@ declare class ImageSpanAttribute extends BaseSpan { * @returns { ImageSpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alt(value: PixelMap): ImageSpanAttribute; } @@ -210,7 +227,8 @@ declare const ImageSpanInstance: ImageSpanAttribute; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type ImageCompleteCallback = (result: ImageLoadResult) => void; @@ -221,7 +239,8 @@ type ImageCompleteCallback = (result: ImageLoadResult) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageLoadResult { /** @@ -231,7 +250,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; /** @@ -241,7 +261,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; /** @@ -251,7 +272,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ componentWidth: number; /** @@ -261,7 +283,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ componentHeight: number; /** @@ -273,7 +296,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loadingStatus: number; /** @@ -283,7 +307,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentWidth: number; /** @@ -293,7 +318,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentHeight: number; /** @@ -303,7 +329,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOffsetX: number; /** @@ -313,7 +340,8 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOffsetY: number; } diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 61242b23f2018437b1cd0f7473230b81acb969e9..76ab07278c5d6dd6b2fe858d9f867cd1ab892c17 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -64,7 +64,6 @@ /// /// /// -/// /// /// /// diff --git a/api/@internal/component/ets/indicatorcomponent.d.ts b/api/@internal/component/ets/indicatorcomponent.d.ts index 88e13f3b95623c813f011f370ef686e72c5b38ef..fea813bcc067cc81fec075831ffdb0b7a5f51430 100644 --- a/api/@internal/component/ets/indicatorcomponent.d.ts +++ b/api/@internal/component/ets/indicatorcomponent.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, Callback } from './common'; +import { DotIndicator, DigitIndicator } from './swiper'; +/*** endif */ + /** * Provides methods for switching components. * @@ -25,7 +30,8 @@ * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class IndicatorComponentController { /** @@ -35,7 +41,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -46,7 +53,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ showNext():void; @@ -57,7 +65,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ showPrevious():void; @@ -71,7 +80,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ changeIndex(index: number, useAnimation?: boolean):void; } @@ -84,7 +94,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface IndicatorComponentInterface { @@ -97,7 +108,8 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: IndicatorComponentController): IndicatorComponentAttribute; } @@ -110,7 +122,8 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare class IndicatorComponentAttribute extends CommonMethod { /** @@ -122,7 +135,8 @@ declare class IndicatorComponentAttribute extends CommonMethod): IndicatorComponentAttribute; } diff --git a/api/@internal/component/ets/inspector.d.ts b/api/@internal/component/ets/inspector.d.ts index aa2ba50e3704331504b3fe8e50aa19cd802708ed..b5ba36dd3842a5a346836d58a3f01a29d900478b 100644 --- a/api/@internal/component/ets/inspector.d.ts +++ b/api/@internal/component/ets/inspector.d.ts @@ -49,8 +49,9 @@ declare function getInspectorNodeById(id: number): object; * @namespace Profiler * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} * @test + * @arkts 1.1&1.2 */ declare namespace Profiler { /** @@ -59,8 +60,9 @@ declare namespace Profiler { * @param { function } callback - the callback info is json string with ui update info. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} * @test + * @arkts 1.1&1.2 */ function registerVsyncCallback(callback: (info: string) => void): void; @@ -69,8 +71,9 @@ declare namespace Profiler { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} * @test + * @arkts 1.1&1.2 */ function unregisterVsyncCallback(): void; } @@ -81,7 +84,8 @@ declare namespace Profiler { * @param { string } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} * @test + * @arkts 1.1&1.2 */ declare function setAppBgColor(value: string): void; diff --git a/api/@internal/component/ets/lazy_grid_layout.d.ts b/api/@internal/component/ets/lazy_grid_layout.d.ts index 632f0f7f177d50abf395456c1549038f106fa610..4ee3ef04f290a68600000d74dfb8e46b301dcd1f 100644 --- a/api/@internal/component/ets/lazy_grid_layout.d.ts +++ b/api/@internal/component/ets/lazy_grid_layout.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ + +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { LengthMetrics } from '../Graphics'; +/*** endif */ + /** * Defines the lazy vertical grid layout component. * @@ -25,7 +31,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface LazyVGridLayoutInterface { /** @@ -35,7 +42,8 @@ interface LazyVGridLayoutInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ (): LazyVGridLayoutAttribute; } @@ -47,7 +55,8 @@ interface LazyVGridLayoutInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LazyGridLayoutAttribute extends CommonMethod { /** @@ -58,7 +67,8 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap(value: LengthMetrics): T; @@ -70,7 +80,8 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap(value: LengthMetrics): T; } @@ -82,7 +93,8 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { /** @@ -93,7 +105,8 @@ declare class LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { /** @@ -375,6 +419,20 @@ declare class LineAttribute extends CommonShapeMethod { */ startPoint(value: Array): LineAttribute; + /** + * Coordinate of the start point of the line (relative coordinate). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + startPoint(value: ShapePoint): LineAttribute; + /** * Line end coordinates (relative coordinates). * @@ -414,6 +472,20 @@ declare class LineAttribute extends CommonShapeMethod { * @since 11 */ endPoint(value: Array): LineAttribute; + + /** + * Line end coordinates (relative coordinates). + * + * @param { ShapePoint } value + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + endPoint(value: ShapePoint): LineAttribute; } /** @@ -479,3 +551,30 @@ declare const Line: LineInterface; * @since 11 */ declare const LineInstance: LineAttribute; + +/** + * Line drawing component. + * + * @interface LineInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface LineInterface { + /** + * The return value of the parameter is Line. + * + * @param { LineOptions } [options] - Line options + * @returns { LineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: LineOptions): LineAttribute; +} diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index 2cd73a15dacb1d1f97b004cce9813c50d178e2bb..2020fab81707ea843457beb9a27a91a5d0556e0c 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ChildrenMainSize, ItemDragInfo, RectResult, ScrollableCommonMethod, Optional, + OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; +import { Axis } from './enums'; +import { OnScrollFrameBeginCallback, ScrollAlign, Scroller } from './scroll'; +import { Dimension, Length, LengthConstrain, ResourceColor } from './units'; +/*** endif */ + /** * Declare scroll status * @@ -50,7 +58,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollState { /** @@ -82,7 +91,8 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Idle, @@ -115,7 +125,8 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scroll, @@ -147,7 +158,8 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fling, } @@ -177,7 +189,8 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemAlign { /** @@ -202,7 +215,8 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -228,7 +242,8 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Center, @@ -254,7 +269,8 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -266,7 +282,8 @@ declare enum ListItemAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemGroupArea { /** @@ -275,7 +292,8 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -285,7 +303,8 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_LIST_ITEM_AREA = 1, @@ -295,7 +314,8 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_HEADER_AREA = 2, @@ -305,7 +325,8 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IN_FOOTER_AREA = 3, } @@ -335,7 +356,8 @@ declare enum ListItemGroupArea { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum StickyStyle { /** @@ -361,7 +383,8 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -388,7 +411,8 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Header = 1, @@ -415,9 +439,21 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Footer = 2, + /** + * In the ListItemGroup component, the header is pinned to the top, + * and the footer is pinned to the bottom. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + BOTH = 3, } /** @@ -426,7 +462,8 @@ declare enum StickyStyle { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ChainEdgeEffect { /** @@ -435,7 +472,8 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT, @@ -444,7 +482,8 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH, } @@ -463,7 +502,8 @@ declare enum ChainEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollSnapAlign { /** @@ -479,7 +519,8 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -500,7 +541,8 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START = 1, @@ -521,7 +563,8 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 2, @@ -542,7 +585,8 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END = 3, } @@ -553,7 +597,8 @@ declare enum ScrollSnapAlign { * @interface ChainAnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ChainAnimationOptions { /** @@ -562,7 +607,8 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ minSpace: Length; @@ -572,7 +618,8 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ maxSpace: Length; @@ -583,7 +630,8 @@ declare interface ChainAnimationOptions { * @default 0.7 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ conductivity?: number; @@ -594,7 +642,8 @@ declare interface ChainAnimationOptions { * @default 0.3 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ intensity?: number; @@ -605,7 +654,8 @@ declare interface ChainAnimationOptions { * @default ChainEdgeEffect.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect?: ChainEdgeEffect; @@ -616,7 +666,8 @@ declare interface ChainAnimationOptions { * @default 228 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ stiffness?: number; @@ -627,7 +678,8 @@ declare interface ChainAnimationOptions { * @default 30 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ damping?: number; } @@ -705,7 +757,8 @@ declare interface UIListEvent extends UIScrollableCommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CloseSwipeActionOptions { /** @@ -723,7 +776,8 @@ declare interface CloseSwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish?: ()=>void } @@ -735,7 +789,8 @@ declare interface CloseSwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VisibleListContentInfo { /** @@ -745,7 +800,8 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number @@ -757,7 +813,8 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemGroupArea?: ListItemGroupArea @@ -769,7 +826,8 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemIndexInGroup?: number } @@ -783,7 +841,8 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollVisibleContentChangeCallback = (start: VisibleListContentInfo, end: VisibleListContentInfo) => void; @@ -813,7 +872,8 @@ declare type OnListScrollIndexCallback = (start: number, end: number, center: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListScroller extends Scroller { /** @@ -822,7 +882,7 @@ declare class ListScroller extends Scroller { * @param { number } index - Index of the ListItemGroup in List. * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. * @returns { RectResult } Returns the size and position. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -843,11 +903,11 @@ declare class ListScroller extends Scroller { * visible in the display area. Otherwise, the value is considered invalid. *
- When index or indexInGroup is set to an invalid value, the returned size and position are both 0. *

- * + * * @param { number } index - Index of the list item group in the list. * @param { number } indexInGroup - Index of the list item in the list item group. * @returns { RectResult } - Size of the list item in the list item group and its position relative to the list. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -855,7 +915,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getItemRectInGroup(index: number, indexInGroup: number): RectResult; @@ -866,7 +927,7 @@ declare class ListScroller extends Scroller { * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. * @param { ScrollAlign } align - Sets the alignment mode of a specified index. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -889,7 +950,7 @@ declare class ListScroller extends Scroller { * @param { boolean } smooth - Whether to enable the smooth animation for scrolling to the item with the specified index. * The value true means to enable that the smooth animation, and false means the opposite.
Default value: false * @param { ScrollAlign } align - How the list item to scroll to is aligned with the container.
Default value: ScrollAlign.START - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -897,7 +958,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollToItemInGroup(index: number, indexInGroup:number, smooth?: boolean, align?: ScrollAlign): void; @@ -905,7 +967,7 @@ declare class ListScroller extends Scroller { * Collapse all listItem. * * @param { CloseSwipeActionOptions } options - Options of close Swipe items. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -920,9 +982,9 @@ declare class ListScroller extends Scroller { *

NOTE: *
- A ListScroller must be bound to the List component. *

- * + * * @param { CloseSwipeActionOptions } options - Callback events for collapsing list items in the EXPANDED state. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -930,7 +992,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ closeAllSwipeActions(options?: CloseSwipeActionOptions): void; @@ -954,7 +1017,8 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; } @@ -965,13 +1029,14 @@ declare class ListScroller extends Scroller { *

NOTE: *
- The default value of the universal attribute clip is true for the List component. *

- * + * * @interface ListOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListOptions { /** @@ -1023,7 +1088,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ initialIndex?: number; /** @@ -1067,7 +1133,8 @@ interface ListOptions { *

NOTE *
If this parameter is set to a negative number or a value greater than or equal to the length of the list content area, the default value is used. *
If this parameter is set to a value less than the width of the list divider, the width of the list divider is used as the spacing. - *
Child components of List whose visibility attribute is set to None are not displayed, but the spacing above and below them still takes effect. + *
Child components of List whose visibility attribute is set to None are not displayed, + * but the spacing above and below them still takes effect. *

* * @type { ?(number | string) } @@ -1076,7 +1143,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space?: number | string; /** @@ -1126,7 +1194,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ scroller?: Scroller; } @@ -1163,7 +1232,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListInterface { /** @@ -1214,7 +1284,8 @@ interface ListInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: ListOptions): ListAttribute; } @@ -1227,7 +1298,8 @@ interface ListInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListDividerOptions { /** @@ -1273,7 +1345,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth: Length; /** @@ -1320,7 +1393,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; /** @@ -1367,7 +1441,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Length; /** @@ -1414,7 +1489,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Length; } @@ -1443,7 +1519,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListAttribute extends ScrollableCommonMethod { /** @@ -1477,7 +1554,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; @@ -1510,7 +1588,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignListItem(value: ListItemAlign): ListAttribute; @@ -1550,7 +1629,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ listDirection(value: Axis): ListAttribute; @@ -1631,7 +1711,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * To produce a bounce effect when there is less than one screen of content, * use the options parameter of the edgeEffect attribute. *

- * + * * @param { EdgeEffect } value - Effect used when the scroll boundary is reached. The spring and shadow effects are supported. *
Default value: EdgeEffect.Spring * @param { EdgeEffectOptions } options - Whether to enable the scroll effect when the component content is smaller than the component itself. @@ -1646,6 +1726,7 @@ declare class ListAttribute extends ScrollableCommonMethod { */ edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): ListAttribute; + /** * Called when need to decide contentStartOffset the list will show. * @param { number } value - the value Of startOffset. @@ -1662,7 +1743,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentStartOffset(value: number): ListAttribute; @@ -1683,7 +1765,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentEndOffset(value: number): ListAttribute; @@ -1735,7 +1818,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ divider( value: ListDividerOptions | null, @@ -1790,7 +1874,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ multiSelectable(value: boolean): ListAttribute; @@ -1832,7 +1917,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): ListAttribute; @@ -1848,7 +1934,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, show: boolean): ListAttribute; @@ -1891,7 +1978,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ chainAnimation(value: boolean): ListAttribute; @@ -1902,7 +1990,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; @@ -1940,7 +2029,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sticky(value: StickyStyle): ListAttribute; @@ -1961,7 +2051,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; @@ -2042,7 +2133,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ childrenMainSize(value: ChildrenMainSize): ListAttribute; @@ -2066,7 +2158,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maintainVisibleContentPosition(enabled: boolean): ListAttribute; @@ -2088,7 +2181,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stackFromEnd(enabled: boolean): ListAttribute; @@ -2096,6 +2190,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * Sets the focus wrap mode of the List component. * * @param { Optional } mode - the focus wrap mode of the List component. + *
Default value: **FocusWrapMode.DEFAULT**. * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2187,14 +2282,15 @@ declare class ListAttribute extends ScrollableCommonMethod { */ /** * Triggered when a child component enters or leaves the list display area. - * + * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; @@ -2206,7 +2302,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; @@ -2366,7 +2463,7 @@ declare class ListAttribute extends ScrollableCommonMethod { /** * Triggered when a list item is deleted. - * + * * @param { function } event * @returns { ListAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2400,7 +2497,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemMove(event: (from: number, to: number) => boolean): ListAttribute; @@ -2435,6 +2533,19 @@ declare class ListAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; + /** + * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. + * (To be triggered, press and hold for 170 milliseconds (ms)) + * + * @param { OnItemDragStartCallback } event - callback function, triggered when the item drag start. + * @returns { ListAttribute } Returns the instance of the ListAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onItemDragStart(event: OnItemDragStartCallback): ListAttribute; + /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -2460,7 +2571,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; @@ -2489,7 +2601,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; @@ -2518,7 +2631,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; @@ -2549,7 +2663,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; @@ -2574,7 +2689,8 @@ declare class ListAttribute extends ScrollableCommonMethod { */ /** * Triggered when the list starts to scroll. The input parameters indicate the amount by which the list will scroll. - * The event handler then works out the amount by which the list needs to scroll based on the real-world situation and returns the result. + * The event handler then works out the amount by which the list needs to scroll based on the real-world situation + * and returns the result. * * @param { function } event * @returns { ListAttribute } @@ -2584,7 +2700,62 @@ declare class ListAttribute extends ScrollableCommonMethod { * @atomicservice * @since 11 */ - onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute; + /** + * Triggered when the list starts to scroll. The input parameters indicate the amount by which the list will scroll. + * The event handler then works out the amount by which the list needs to scroll based on the real-world situation + * and returns the result. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { ListAttribute } Returns the instance of the ListAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): ListAttribute; + + /** + * Called when scrolling begin each frame. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { ListAttribute } Returns the instance of the ListAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): ListAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): ListAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { ListAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): ListAttribute; } /** diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index ae66c200dc373eae80da40e21983066e76c1ecf8..e5149aa59394752370a561abfd186574be56dfe6 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { Length } from './units'; +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * Declare item ceiling attribute. * @@ -115,7 +122,8 @@ declare enum EditMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeEdgeEffect { /** @@ -137,7 +145,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Spring, @@ -160,7 +169,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, } @@ -180,7 +190,8 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwipeActionState { /** @@ -194,7 +205,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLLAPSED, @@ -209,7 +221,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPANDED, @@ -224,7 +237,8 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTIONING, } @@ -243,7 +257,8 @@ declare enum SwipeActionState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwipeActionItem { /** @@ -262,7 +277,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -274,7 +290,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ builderComponent?: ComponentContent; @@ -294,7 +311,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ actionAreaDistance?: Length; @@ -312,7 +330,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAction?: () => void; @@ -330,7 +349,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterActionArea?: () => void; @@ -348,7 +368,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onExitActionArea?: () => void; @@ -367,7 +388,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange?: (state: SwipeActionState) => void; } @@ -394,7 +416,8 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwipeActionOptions { /** @@ -422,7 +445,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: CustomBuilder | SwipeActionItem; @@ -451,7 +475,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: CustomBuilder | SwipeActionItem; @@ -477,7 +502,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect?: SwipeEdgeEffect; @@ -496,7 +522,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onOffsetChange?: (offset: number) => void; } @@ -515,7 +542,8 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemStyle { /** @@ -530,7 +558,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -546,7 +575,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CARD = 1, } @@ -565,7 +595,8 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListItemOptions { /** @@ -582,7 +613,8 @@ declare interface ListItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ListItemStyle; } @@ -619,7 +651,8 @@ declare interface ListItemOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListItemInterface { /** @@ -641,7 +674,8 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: ListItemOptions): ListItemAttribute; @@ -691,7 +725,8 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListItemAttribute extends CommonMethod { /** @@ -753,7 +788,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectable(value: boolean): ListItemAttribute; @@ -778,7 +814,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: boolean): ListItemAttribute; @@ -807,7 +844,8 @@ declare class ListItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ swipeAction(value: SwipeActionOptions): ListItemAttribute; @@ -847,7 +885,8 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(event: (isSelected: boolean) => void): ListItemAttribute; } diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts index 1033ca2cd06f270becb7cd3008d9d0c02ac887d2..44000be5c58f8c36e06573ee8f8d808ff96917d1 100644 --- a/api/@internal/component/ets/list_item_group.d.ts +++ b/api/@internal/component/ets/list_item_group.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ChildrenMainSize, CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { ComponentContent } from '../ComponentContent' +import { ListDividerOptions } from './list'; +/*** endif */ + /** * Defines the list item group style. * @@ -32,7 +39,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ListItemGroupStyle { /** @@ -47,7 +55,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -63,7 +72,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CARD = 1, } @@ -90,7 +100,8 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ListItemGroupOptions { /** @@ -115,7 +126,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header?: CustomBuilder; @@ -126,7 +138,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ headerComponent?: ComponentContent; @@ -152,7 +165,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: CustomBuilder; @@ -163,7 +177,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ footerComponent?: ComponentContent; @@ -189,7 +204,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space?: number | string; @@ -207,7 +223,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: ListItemGroupStyle; } @@ -234,7 +251,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ListItemGroupInterface { /** @@ -262,7 +280,8 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: ListItemGroupOptions): ListItemGroupAttribute; } @@ -289,7 +308,8 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ListItemGroupAttribute extends CommonMethod { /** @@ -343,7 +363,8 @@ declare class ListItemGroupAttribute extends CommonMethod { /** @@ -293,7 +305,8 @@ declare class LoadingProgressAttribute extends CommonMethod): LoadingProgressAttribute; } @@ -339,7 +354,8 @@ declare class LoadingProgressAttribute extends CommonMethod { /** @@ -349,7 +365,8 @@ declare interface LoadingProgressConfiguration extends CommonConfiguration { /** @@ -446,7 +462,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): MarqueeAttribute; @@ -491,7 +508,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): MarqueeAttribute; @@ -535,7 +553,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ allowScale(value: boolean): MarqueeAttribute; @@ -584,7 +603,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): MarqueeAttribute; @@ -630,7 +650,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): MarqueeAttribute; @@ -647,7 +668,8 @@ declare class MarqueeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ marqueeUpdateStrategy(value: MarqueeUpdateStrategy): MarqueeAttribute; @@ -687,7 +709,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: () => void): MarqueeAttribute; @@ -731,7 +754,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onBounce(event: () => void): MarqueeAttribute; @@ -771,7 +795,8 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: () => void): MarqueeAttribute; } @@ -806,7 +831,7 @@ declare class MarqueeAttribute extends CommonMethod { * use the Text component's TextOverflow.MARQUEE as a substitute. *
The text is scrolled only when its width exceeds the width of the Marquee component. *

- * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts index 594e7dc4e95d61c89672e5ad35dc8fb12201d0d5..f15e0639ab8e8cef3008046968a67d8701ca7dfe 100644 --- a/api/@internal/component/ets/matrix2d.d.ts +++ b/api/@internal/component/ets/matrix2d.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { LengthMetricsUnit } from '../Graphics'; +/*** endif */ + /** * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis * @@ -46,7 +50,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Matrix2D { /** @@ -81,7 +86,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleX?: number; @@ -117,7 +123,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotateY?: number; @@ -153,7 +160,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotateX?: number; @@ -189,7 +197,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleY?: number; @@ -225,7 +234,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translateX?: number; @@ -261,7 +271,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translateY?: number; @@ -301,7 +312,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ identity(): Matrix2D; @@ -341,7 +353,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ invert(): Matrix2D; @@ -413,7 +426,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(degree: number, rx?: number, ry?: number): Matrix2D; @@ -457,7 +471,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(tx?: number, ty?: number): Matrix2D; @@ -501,7 +516,8 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(sx?: number, sy?: number): Matrix2D; @@ -520,19 +536,21 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** * Constructs a 2D change matrix object. The default value is the unit matrix. * - * @param { LengthMetricsUnit } [unit] - the unit mode + * @param { LengthMetricsUnit } unit - the unit mode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(unit: LengthMetricsUnit); } diff --git a/api/@internal/component/ets/media_cached_image.d.ts b/api/@internal/component/ets/media_cached_image.d.ts index 70b0546afbc3add213b1b476eb2c70ee883b9a0d..4a20ef46d6b456ce808e2110e72fd041353d73bb 100644 --- a/api/@internal/component/ets/media_cached_image.d.ts +++ b/api/@internal/component/ets/media_cached_image.d.ts @@ -17,14 +17,20 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { ImageAttribute } from './image'; +import image from '../../@ohos.multimedia.image'; +import { ResourceStr } from './units' +import { DrawableDescriptor } from '../../@ohos.arkui.drawableDescriptor'; +/*** endif */ /** * Defines the resource which can use ASTC. * * @interface ASTCResource * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ASTCResource { /** @@ -32,7 +38,8 @@ interface ASTCResource { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sources: Array; /** @@ -40,7 +47,8 @@ interface ASTCResource { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ column: number; } @@ -49,7 +57,8 @@ interface ASTCResource { * @interface MediaCachedImageInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaCachedImageInterface { /** @@ -62,6 +71,17 @@ interface MediaCachedImageInterface { * @since 12 */ (src: PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute; + /** + * Image resource to be obtained. + * + * @param { PixelMap | ResourceStr | DrawableDescriptor | ASTCResource } src + * @returns { MediaCachedImageAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + (src: image.PixelMap | ResourceStr | DrawableDescriptor | ASTCResource): MediaCachedImageAttribute; } /** @@ -70,7 +90,8 @@ interface MediaCachedImageInterface { * @extends ImageAttribute * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MediaCachedImageAttribute extends ImageAttribute {} diff --git a/api/@internal/component/ets/menu.d.ts b/api/@internal/component/ets/menu.d.ts index 3e65f327dbc965e5e1b6943e77ff1932b6366c25..52cc8ce8af590973b6ff4fae4f6ade4c3be35e4a 100644 --- a/api/@internal/component/ets/menu.d.ts +++ b/api/@internal/component/ets/menu.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { Length, Font, ResourceColor, Dimension, BorderRadiuses, DividerStyleOptions } from './units'; +/*** endif */ + /** * Defines the Menu Component. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuInterface { /** @@ -65,7 +71,8 @@ interface MenuInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): MenuAttribute; } @@ -77,7 +84,8 @@ interface MenuInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SubMenuExpandingMode { /** @@ -86,7 +94,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SIDE_EXPAND = 0, @@ -96,7 +105,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_EXPAND = 1, @@ -106,7 +116,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STACK_EXPAND = 2, } @@ -133,7 +144,8 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuAttribute extends CommonMethod { /** @@ -167,7 +179,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): MenuAttribute; @@ -188,7 +201,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): MenuAttribute; @@ -211,7 +225,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius(value: Dimension | BorderRadiuses): MenuAttribute; @@ -223,7 +238,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemDivider(options: DividerStyleOptions | undefined): MenuAttribute; @@ -235,7 +251,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemGroupDivider(options: DividerStyleOptions | undefined): MenuAttribute; @@ -247,7 +264,8 @@ declare class MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subMenuExpandingMode(mode: SubMenuExpandingMode): MenuAttribute; diff --git a/api/@internal/component/ets/menu_item.d.ts b/api/@internal/component/ets/menu_item.d.ts index 825be1c7b0e954a31ec00c6dd69a795cf3c62029..06db50f9ececa0ea3422057e9848bfae77987ead 100644 --- a/api/@internal/component/ets/menu_item.d.ts +++ b/api/@internal/component/ets/menu_item.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceStr, Font, ResourceColor } from './units'; +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder'; +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; +/*** endif */ + /** * Defines the option of MenuItem. * @@ -40,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemOptions { /** @@ -65,7 +73,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startIcon?: ResourceStr; @@ -85,6 +94,7 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolStartIcon?: SymbolGlyphModifier; @@ -110,7 +120,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ content?: ResourceStr; @@ -136,7 +147,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endIcon?: ResourceStr; @@ -156,6 +168,7 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolEndIcon?: SymbolGlyphModifier; @@ -181,7 +194,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelInfo?: ResourceStr; @@ -207,7 +221,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; } @@ -234,7 +249,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuItemInterface { /** @@ -262,7 +278,8 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: MenuItemOptions | CustomBuilder): MenuItemAttribute; } @@ -289,7 +306,8 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuItemAttribute extends CommonMethod { /** @@ -317,7 +335,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: boolean): MenuItemAttribute; @@ -368,7 +387,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier): MenuItemAttribute; @@ -397,7 +417,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (selected: boolean) => void): MenuItemAttribute; @@ -420,7 +441,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contentFont(value: Font): MenuItemAttribute; @@ -441,7 +463,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ contentFontColor(value: ResourceColor): MenuItemAttribute; @@ -464,7 +487,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelFont(value: Font): MenuItemAttribute; @@ -485,7 +509,8 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ labelFontColor(value: ResourceColor): MenuItemAttribute; } diff --git a/api/@internal/component/ets/menu_item_group.d.ts b/api/@internal/component/ets/menu_item_group.d.ts index e7e7b8920457ef5ec570d05854e16b40d1a57a36..fa5e23ff42266d460da0a239e866870d6ff9cec1 100644 --- a/api/@internal/component/ets/menu_item_group.d.ts +++ b/api/@internal/component/ets/menu_item_group.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceStr } from './units'; +/*** endif */ + /** * Defines the option of MenuItemGroup. * @@ -40,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemGroupOptions { /** @@ -65,7 +72,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header?: ResourceStr | CustomBuilder; @@ -91,7 +99,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: ResourceStr | CustomBuilder; } @@ -118,7 +127,8 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface MenuItemGroupInterface { /** @@ -146,7 +156,8 @@ interface MenuItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: MenuItemGroupOptions): MenuItemGroupAttribute; } @@ -173,7 +184,8 @@ interface MenuItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MenuItemGroupAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/nav_destination.d.ts b/api/@internal/component/ets/nav_destination.d.ts index 6ef91a9cc7016c0532c29990d87e3f67ef507e89..9cc21a6957904fef9f87b3ba689456ec98a6d26f 100644 --- a/api/@internal/component/ets/nav_destination.d.ts +++ b/api/@internal/component/ets/nav_destination.d.ts @@ -18,6 +18,22 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { CommonMethod, Callback, LayoutSafeAreaType, LayoutSafeAreaEdge, Optional, PixelMap } from './common' +import { CustomBuilder } from './builder' +import { Length, ResourceStr } from './units' +import { TitleHeight, Curve } from './enums' +import { + NavPathInfo, NavPathStack, NavigationTitleOptions, NavigationMenuItem, NavigationToolbarOptions, + ToolbarItem, NavigationMenuOptions, NavigationOperation, SystemBarStyle +} from './navigation' +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' +import window from '../../@ohos.window' +import image from '../../@ohos.multimedia.image' +import { Scroller } from './scroll' +/*** endif */ + /** * Import the Orientation type from @ohos.window. * @@ -29,6 +45,18 @@ */ declare type Orientation = import('../api/@ohos.window').default.Orientation; +/** + * Import the Orientation type from @ohos.window. + * + * @typedef { import('../api/@ohos.window').default.Orientation } Orientation + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Orientation = window.Orientation; + /** * Defines the navigation destination common title. * @@ -51,7 +79,8 @@ declare type Orientation = import('../api/@ohos.window').default.Orientation; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationCommonTitle { /** @@ -85,7 +114,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ main: string | Resource; @@ -120,7 +150,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sub: string | Resource; } @@ -147,7 +178,8 @@ declare interface NavDestinationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationCustomTitle { /** @@ -172,7 +204,8 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; @@ -198,7 +231,8 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: TitleHeight | Length; } @@ -210,7 +244,8 @@ declare interface NavDestinationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationSystemTransitionType { /** @@ -219,7 +254,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** @@ -228,7 +264,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 1, /** @@ -237,7 +274,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TITLE = 2, /** @@ -246,7 +284,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT = 3, /** @@ -255,7 +294,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FADE = 4, /** @@ -264,7 +304,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ EXPLODE = 5, /** @@ -273,7 +314,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_RIGHT = 6, /** @@ -282,7 +324,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE_BOTTOM = 7, } @@ -302,7 +345,8 @@ declare enum NavigationSystemTransitionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavDestinationMode { /** @@ -318,7 +362,8 @@ declare enum NavDestinationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, @@ -337,7 +382,8 @@ declare enum NavDestinationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 1, } @@ -349,7 +395,8 @@ declare enum NavDestinationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavDestinationActiveReason { /** @@ -358,7 +405,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSITION = 0, @@ -368,7 +416,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_COVER = 1, @@ -378,7 +427,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ SHEET = 2, @@ -388,7 +438,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ DIALOG = 3, @@ -398,7 +449,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAY = 4, @@ -408,11 +460,53 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ APP_STATE = 5, } +/** + * The reason of navDestination be shown or hidden. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ +declare enum VisibilityChangeReason { + /** + * The visibility lifecycle changes through page navigation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + TRANSITION = 0, + + /** + * The visibility lifecycle changes through bindContentCover. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + CONTENT_COVER = 1, + + /** + * The visibility lifecycle changes through the states of application (foreground or background). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + APP_STATE = 2, +} + /** * The construct function of NavDestination. * @@ -435,7 +529,8 @@ declare enum NavDestinationActiveReason { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationInterface { /** @@ -460,7 +555,8 @@ declare interface NavDestinationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): NavDestinationAttribute; } @@ -472,7 +568,8 @@ declare interface NavDestinationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RouteMapConfig { /** @@ -482,7 +579,8 @@ declare interface RouteMapConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -493,7 +591,8 @@ declare interface RouteMapConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pageSourceFile: string; @@ -504,7 +603,8 @@ declare interface RouteMapConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ data: Object } @@ -516,7 +616,8 @@ declare interface RouteMapConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavDestinationContext { /** @@ -526,7 +627,8 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pathInfo: NavPathInfo; @@ -537,7 +639,8 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pathStack: NavPathStack; @@ -549,7 +652,8 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; @@ -562,7 +666,8 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getConfigInRouteMap(): RouteMapConfig | undefined; } @@ -574,7 +679,8 @@ declare interface NavDestinationContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollInfo { /** @@ -584,7 +690,8 @@ declare interface NestedScrollInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ parent: Scroller; @@ -596,7 +703,8 @@ declare interface NestedScrollInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ child: Scroller; } @@ -608,7 +716,8 @@ declare interface NestedScrollInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 15 +* @since arkts {'1.1':'15','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavDestinationTransition { /** @@ -618,7 +727,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onTransitionEnd?: Callback; @@ -630,7 +740,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; @@ -642,7 +753,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve; @@ -654,7 +766,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -667,7 +780,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ event: Callback; } @@ -694,11 +808,12 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavDestinationAttribute extends CommonMethod { /** - * Navigation title bar + * NavDestination title bar * * @param { string | CustomBuilder | NavDestinationCommonTitle | NavDestinationCustomTitle } value * @returns { NavDestinationAttribute } @@ -706,7 +821,7 @@ declare class NavDestinationAttribute extends CommonMethodDefault value: **false**. + *
**true**: Hide the title bar. + *
**false**: Show the title bar. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(value: boolean): NavDestinationAttribute; @@ -786,12 +906,19 @@ declare class NavDestinationAttribute extends CommonMethodDefault value: **false**. + *
**true**: Hide the title bar. + *
**false**: Show the title bar. * @param { boolean } animated + *
Default value: **false**. + *
**true**: Animate the visibility change. + *
**false**: Do not animate the visibility change. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(hide: boolean, animated: boolean): NavDestinationAttribute; @@ -803,7 +930,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -826,7 +954,17 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; + /** + * Called when the navigation destination page is displayed. + * + * @param { Callback } callback - Indicates callback when the navDestination page is displayed. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + onShown(callback: Callback): NavDestinationAttribute; /** * Called when the navigation destination page is hidden. @@ -847,7 +985,17 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; + /** + * Called when the navigation destination page is hidden. + * + * @param { Callback } callback - Indicates callback when the navDestination is hidden. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + onHidden(callback: Callback): NavDestinationAttribute; /** * Called when the navigation destination is about @@ -868,7 +1016,8 @@ declare class NavDestinationAttribute extends CommonMethod boolean): NavDestinationAttribute; @@ -902,7 +1051,8 @@ declare class NavDestinationAttribute extends CommonMethod - * + * * @param { ResourceStr | PixelMap | SymbolGlyphModifier } icon - Icon of the back button on the title bar. - * @param { ResourceStr } accessibilityText - Accessibility text for the back button. + * @param { ResourceStr } [accessibilityText] - Accessibility text for the back button. *
Default value: **back** when the system language is English. * @returns { NavDestinationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(icon: ResourceStr | PixelMap | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavDestinationAttribute; - + /** * Sets the menu items in the upper right corner of the page. * If this attribute is not set, no menu item is displayed. @@ -970,7 +1122,8 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder): NavDestinationAttribute; @@ -983,7 +1136,8 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder, options?: NavigationMenuOptions): NavDestinationAttribute; @@ -1010,7 +1164,8 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder, options?: NavigationToolbarOptions): NavDestinationAttribute; @@ -1029,7 +1184,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; + /** + * Invoked before sub-components of NavDestination are created. + * + * @param { Callback } callback + * - Indicates callback that invoked before sub-components of NavDestination are created. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onReady(callback: Callback): NavDestinationAttribute; + /** * Called when the navigation destination is about to be mounted. * You can change the navigation stack in this callback function, and the change takes effect in the current frame. @@ -1055,7 +1225,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1068,7 +1239,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1080,7 +1252,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1092,7 +1265,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1107,7 +1281,8 @@ declare class NavDestinationAttribute extends CommonMethod, edges?: Array): NavDestinationAttribute; @@ -1124,7 +1299,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1146,7 +1322,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1160,7 +1337,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1215,7 +1394,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1229,7 +1409,8 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; @@ -1243,7 +1424,8 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; @@ -1259,7 +1441,8 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; + + /** + * Invoked when destination be pushed with singleton mode. + * + * @param { Optional> } callback - Indicates callback when destination be pushed with singleton mode. + * @returns { NavDestinationAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onNewParam(callback: Optional>): NavDestinationAttribute; /** * Sets the display orientation for the **NavDestination** component. After the transition to the NavDestination, @@ -1299,7 +1495,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1320,11 +1517,14 @@ declare class NavDestinationAttribute extends CommonMethod**NavDestination** component. * @param { boolean } [animated] - Whether to use an animation to show or hide the system status bar. *
Default value: **false**. + *
**true**: Hide/show the system status bar with animation. + *
**false**: Hide/show the system status bar without animation. * @returns { NavDestinationAttribute } Returns the instance of the NavDestinationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableStatusBar(enabled: Optional, animated?: boolean): NavDestinationAttribute; @@ -1347,7 +1547,8 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; } @@ -1411,7 +1612,8 @@ declare const NavDestinationInstance: NavDestinationAttribute; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type NavDestinationTransitionDelegate = (operation: NavigationOperation, isEnter: boolean) => Array | undefined; \ No newline at end of file diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts index a8653f1bdc895f668c79f81ab96b0702629e2174..30b40af227bbe671ce554699c13438bda62713e7 100644 --- a/api/@internal/component/ets/navigation.d.ts +++ b/api/@internal/component/ets/navigation.d.ts @@ -18,6 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import window from '../../@ohos.window'; +import { Resource } from '../../global/resource'; +import { TextModifier } from '../../arkui/TextModifier'; +import { LengthMetrics } from '../../arkui/Graphics'; +import { Callback, BlurStyle, CommonMethod, Optional, LayoutSafeAreaType, LayoutSafeAreaEdge, BackgroundEffectOptions, BackgroundBlurStyleOptions, PixelMap, Bindable } from './common' +import { CustomBuilder, PageMapBuilder } from './builder' +import { Length, ResourceStr, ResourceColor, Dimension, VoidCallback } from './units' +import { TitleHeight } from './enums' +import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' +import { NavDestinationContext, NavDestinationMode } from './navDestination' +/*** endif */ + /** * Import the SystemBarStyle type for Navigation. * @@ -28,6 +41,18 @@ */ declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarStyle; + +/** + * Import the SystemBarStyle type for Navigation. + * + * @typedef { window.SystemBarStyle } SystemBarStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type SystemBarStyle = window.SystemBarStyle; + /** * Defines the navigation common title. * @@ -50,7 +75,8 @@ declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationCommonTitle { /** @@ -84,7 +110,8 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ main: string | Resource; @@ -119,7 +146,8 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sub: string | Resource; } @@ -146,7 +174,8 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationCustomTitle { /** @@ -171,7 +200,8 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder: CustomBuilder; @@ -197,7 +227,8 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: TitleHeight | Length; } @@ -225,7 +256,8 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationMode { /** @@ -247,7 +279,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Stack, @@ -270,7 +303,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Split, @@ -296,7 +330,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -323,7 +358,8 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavBarPosition { /** @@ -345,7 +381,8 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -368,7 +405,8 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -395,7 +433,8 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationTitleMode { /** @@ -456,7 +495,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Free = 0, @@ -485,7 +525,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Full, @@ -514,7 +555,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Mini, } @@ -541,7 +583,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationMenuItem { /** @@ -575,7 +618,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | Resource; @@ -610,7 +654,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string | Resource; @@ -630,6 +675,7 @@ declare interface NavigationMenuItem { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -637,10 +683,12 @@ declare interface NavigationMenuItem { * Whether to enable this menu item. * * @type { ?boolean } + * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEnabled?: boolean; @@ -666,7 +714,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action?: () => void; } @@ -686,7 +735,8 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PopInfo { /** @@ -704,7 +754,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ info: NavPathInfo; @@ -723,7 +774,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ result: Object; } @@ -741,7 +793,8 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavPathInfo { /** @@ -771,12 +824,30 @@ declare class NavPathInfo { * @param { unknown } param - The detailed parameter of the NavDestination. * @param { ?import('../api/@ohos.base').Callback } onPop - The callback when next page returns. * @param { ?boolean } isEntry - Indicates whether it is an entry destination. + * Default value: **false**. + * **true**: The navigation destination page is the entry page. + * **false**: The navigation destination page is not the entry page. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ constructor(name: string, param: unknown, onPop?: import('../api/@ohos.base').Callback, isEntry?: boolean); + + /** + * Creates an instance of NavPathInfo. + * + * @param { string } name - The name of NavDestination. + * @param { Object | null | undefined } param - The detailed parameter of the NavDestination. + * @param { Callback } [onPop] - The callback when next page returns. + * @param { boolean } [isEntry] - Indicates whether it is an entry destination. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(name: string, param: Object | null | undefined, onPop?: Callback, isEntry?: boolean); /** * Name of the navigation destination page. @@ -793,7 +864,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -815,6 +887,18 @@ declare class NavPathInfo { * @since 11 */ param?: unknown; + + /** + * The detailed parameter of the NavDestination. + * + * @type { ?(Object | null | undefined) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + param?: Object | null | undefined; /** * Callback returned when pop is called on the navigation destination page. @@ -837,6 +921,18 @@ declare class NavPathInfo { */ onPop?: import('../api/@ohos.base').Callback; + /** + * The callback when next page returns. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onPop?: Callback; + /** * Indicates whether it is an entry destination. * @@ -844,7 +940,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEntry?: boolean; @@ -855,7 +952,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; } @@ -867,7 +965,8 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LaunchMode { /** @@ -878,7 +977,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, @@ -889,7 +989,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOVE_TO_TOP_SINGLETON = 1, @@ -900,7 +1001,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POP_TO_SINGLETON = 2, @@ -911,7 +1013,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_INSTANCE = 3, } @@ -923,7 +1026,8 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationOptions { /** @@ -934,7 +1038,8 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ launchMode?: LaunchMode; @@ -948,7 +1053,8 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ animated?: boolean; } @@ -966,7 +1072,8 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavPathStack { /** @@ -982,7 +1089,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1004,7 +1112,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pushPath(info: NavPathInfo, animated?: boolean): void; @@ -1017,7 +1126,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushPath(info: NavPathInfo, options?: NavigationOptions): void; @@ -1062,7 +1172,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestination(info: NavPathInfo, animated?: boolean): Promise; @@ -1084,7 +1195,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1111,6 +1223,22 @@ declare class NavPathStack { * @since 11 */ pushPathByName(name: string, param: unknown, animated?: boolean): void; + + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object | null | undefined } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushPathByName(name: string, param: Object | null | undefined, animated?: boolean): void; /** * Pushes the specified NavDestination into the stack. @@ -1140,6 +1268,23 @@ declare class NavPathStack { * @since 12 */ pushPathByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): void; + + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { Callback } onPop - The callback when next page returns. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushPathByName(name: string, param: Object, onPop: Callback, animated?: boolean): void; /** * Pushes the specified NavDestination into the stack. @@ -1147,6 +1292,8 @@ declare class NavPathStack { * @param { string } name - Indicates the name of the NavDestination to be pushed. * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1165,6 +1312,8 @@ declare class NavPathStack { * @param { string } name - Indicates the name of the NavDestination to be pushed. * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1176,7 +1325,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushDestinationByName(name: string, param: Object, animated?: boolean): Promise; @@ -1187,6 +1337,8 @@ declare class NavPathStack { * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1206,6 +1358,8 @@ declare class NavPathStack { * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { import('../api/@ohos.base').Callback } onPop - The callback when next page returns. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified. @@ -1221,11 +1375,39 @@ declare class NavPathStack { */ pushDestinationByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): Promise; + /** + * Pushes the specified NavDestination into the stack. + * + * @param { string } name - Indicates the name of the NavDestination to be pushed. + * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. + * @param { Callback } onPop - The callback when next page returns. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameters types. + * 3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100005 - Builder function not registered. + * @throws { BusinessError } 100006 - NavDestination not found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pushDestinationByName(name: string, param: Object, onPop: Callback, animated?: boolean): Promise; + /** * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. * * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. + *
**false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 @@ -1235,10 +1417,14 @@ declare class NavPathStack { * * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. * @param { boolean } [animated] - Indicates whether the transition is animated. + * Default value: **true**. + * **true**: The transition animation is supported. + * **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePath(info: NavPathInfo, animated?: boolean): void; @@ -1250,7 +1436,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePath(info: NavPathInfo, options?: NavigationOptions): void; @@ -1270,7 +1457,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ replaceDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1297,7 +1485,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacePathByName(name: string, param: Object, animated?: boolean): void; @@ -1318,7 +1507,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByIndexes(indexes: Array): number; @@ -1339,7 +1529,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByName(name: string): number; @@ -1353,7 +1544,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeByNavDestinationId(navDestinationId: string): boolean; @@ -1368,12 +1560,15 @@ declare class NavPathStack { /** * Pops the top NavDestination out of the stack. * - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported.
**false**: The transition animation is not supported. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pop(animated?: boolean): NavPathInfo | undefined; @@ -1381,7 +1576,9 @@ declare class NavPathStack { * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. * * @param { Object } result - The result of the NavDestination. - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported.
**false**: The transition animation is not supported. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1391,12 +1588,15 @@ declare class NavPathStack { * Pops the top NavDestination out of the stack. Invokes the **onPop** callback to pass the page processing result. * * @param { Object } result - The result of the NavDestination. - * @param { boolean } [animated] - Indicates whether the transition is animated. Default value is **true**. + * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported.
**false**: The transition animation is not supported. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pop(result: Object, animated?: boolean): NavPathInfo | undefined; @@ -1420,7 +1620,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToName(name: string, animated?: boolean): number; @@ -1453,7 +1654,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ popToName(name: string, result: Object, animated?: boolean): number; @@ -1475,7 +1677,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToIndex(index: number, animated?: boolean): void; @@ -1490,7 +1693,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ popToIndex(index: number, result: Object, animated?: boolean): void; @@ -1510,11 +1714,14 @@ declare class NavPathStack { * * @param { string } name - Indicates the name of the NavDestination to be moved to the top. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveToTop(name: string, animated?: boolean): number; @@ -1537,7 +1744,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ moveIndexToTop(index: number, animated?: boolean): void; @@ -1558,7 +1766,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clear(animated?: boolean): void; @@ -1577,7 +1786,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getAllPathName(): Array; @@ -1603,6 +1813,19 @@ declare class NavPathStack { * @since 11 */ getParamByIndex(index: number): unknown | undefined; + + /** + * Obtains the param of the specified NavDestination. + * + * @param { number } index - Indicates the index of the NavDestination. + * @returns { Object | null | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined; + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getParamByIndex(index: number): Object | null | undefined; /** * Obtains the param of the specified NavDestination. @@ -1624,6 +1847,19 @@ declare class NavPathStack { * @since 11 */ getParamByName(name: string): Array; + + /** + * Obtains the param of the specified NavDestination. + * + * @param { string } name - Indicates the name of the NavDestination. + * @returns { Array } Returns the detailed parameter of all the NavDestinations. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getParamByName(name: string): Array; /** * Obtains the indexes of all the navigation destination pages that match **name**. @@ -1642,7 +1878,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getIndexByName(name: string): Array; @@ -1655,7 +1892,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getParent(): NavPathStack | null; @@ -1676,7 +1914,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size(): number; @@ -1701,7 +1940,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disableAnimation(value: boolean): void; @@ -1712,7 +1952,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterception(interception: NavigationInterception): void; @@ -1723,7 +1964,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getPathStack(): Array; @@ -1732,10 +1974,13 @@ declare class NavPathStack { * * @param { Array } pathStack - The NavPathInfo array. * @param { boolean } [animated] - Indicate whether the operation has animation. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setPathStack(pathStack: Array, animated?: boolean): void; } @@ -1747,7 +1992,8 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type NavBar = 'navBar' @@ -1762,7 +2008,8 @@ declare type NavBar = 'navBar' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: NavDestinationContext|NavBar, operation: NavigationOperation, isAnimated: boolean) => void; @@ -1774,7 +2021,8 @@ declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type InterceptionModeCallback = (mode: NavigationMode) => void; @@ -1785,7 +2033,8 @@ declare type InterceptionModeCallback = (mode: NavigationMode) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationInterception { /** @@ -1796,7 +2045,8 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ willShow?: InterceptionShowCallback; @@ -1807,7 +2057,8 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ didShow?: InterceptionShowCallback; @@ -1818,7 +2069,8 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ modeChange?: InterceptionModeCallback; } @@ -1878,7 +2130,8 @@ declare interface HomePathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface NavigationInterface { /** @@ -1903,7 +2156,8 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): NavigationAttribute; @@ -1924,7 +2178,8 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (pathInfos: NavPathStack): NavigationAttribute; @@ -1956,7 +2211,8 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ToolbarItemStatus { /** @@ -1975,7 +2231,8 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -1991,7 +2248,8 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLED = 1, @@ -2009,7 +2267,8 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ACTIVE = 2, } @@ -2029,7 +2288,8 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum NavigationOperation { /** @@ -2045,7 +2305,8 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PUSH = 1, @@ -2062,7 +2323,8 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ POP = 2, @@ -2079,7 +2341,8 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE = 3, } @@ -2107,6 +2370,7 @@ declare enum NavigationOperation { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface ToolbarItem { /** @@ -2124,7 +2388,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -2143,7 +2408,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -2163,6 +2429,7 @@ declare interface ToolbarItem { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -2181,7 +2448,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ action?: () => void; @@ -2189,6 +2457,7 @@ declare interface ToolbarItem { * The state of navigation toolbar item. * * @type { ?ToolbarItemStatus } + * @default ToolbarItemStatus.NORMAL * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -2197,10 +2466,12 @@ declare interface ToolbarItem { * The state of navigation toolbar item. * * @type { ?ToolbarItemStatus } + * @default ToolbarItemStatus.NORMAL * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status?: ToolbarItemStatus; @@ -2219,7 +2490,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ activeIcon?: ResourceStr; @@ -2239,6 +2511,7 @@ declare interface ToolbarItem { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ activeSymbolIcon?: SymbolGlyphModifier; } @@ -2250,7 +2523,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationTitleOptions { /** @@ -2260,7 +2534,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -2272,7 +2547,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -2283,7 +2559,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2294,7 +2571,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -2307,7 +2585,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ barStyle?: BarStyle; @@ -2319,7 +2598,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paddingStart?: LengthMetrics; @@ -2331,7 +2611,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paddingEnd?: LengthMetrics; @@ -2342,7 +2623,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ mainTitleModifier?: TextModifier; @@ -2353,7 +2635,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ subTitleModifier?: TextModifier; @@ -2362,10 +2645,13 @@ declare interface NavigationTitleOptions { * * @type { ?boolean } * @default false + *
**true**: Enable hover effects. + *
**false**: Disable hover effects. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; } @@ -2377,7 +2663,8 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarStyle { /** @@ -2386,7 +2673,8 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, @@ -2396,7 +2684,8 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STACK = 1, @@ -2406,7 +2695,8 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SAFE_AREA_PADDING = 2, } @@ -2418,7 +2708,8 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationToolbarOptions { /** @@ -2428,7 +2719,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -2440,7 +2732,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -2451,7 +2744,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2462,7 +2756,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -2473,7 +2768,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ moreButtonOptions?: MoreButtonOptions; @@ -2485,7 +2781,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ barStyle?: BarStyle; @@ -2494,10 +2791,13 @@ declare interface NavigationToolbarOptions { * * @type { ?boolean } * @default false + *
**true**: Hide the toolbar text. + *
**false**: Show the toolbar text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ hideItemValue?: boolean } @@ -2509,7 +2809,8 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavigationMenuOptions { /** @@ -2519,7 +2820,8 @@ declare interface NavigationMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ moreButtonOptions?: MoreButtonOptions; } @@ -2531,7 +2833,8 @@ declare interface NavigationMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MoreButtonOptions { /** @@ -2541,7 +2844,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -2552,7 +2856,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2563,7 +2868,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; } @@ -2590,7 +2896,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NavigationAttribute extends CommonMethod { /** @@ -2627,7 +2934,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarWidth(value: Length): NavigationAttribute; @@ -2662,7 +2970,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarPosition(value: NavBarPosition): NavigationAttribute; @@ -2689,7 +2998,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; @@ -2720,7 +3030,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minContentWidth(value: Dimension): NavigationAttribute; @@ -2755,7 +3066,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mode(value: NavigationMode): NavigationAttribute; @@ -2794,7 +3106,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(value: string | PixelMap | Resource | SymbolGlyphModifier): NavigationAttribute; @@ -2802,12 +3115,14 @@ declare class NavigationAttribute extends CommonMethod { * Sets the back button icon and accessibility broadcast content. * * @param { string | PixelMap | Resource | SymbolGlyphModifier } icon - Indicates icon of back button - * @param { ResourceStr } accessibilityText - Indicates content needs to broadcast. + * @param { ResourceStr } [accessibilityText] - Indicates content needs to broadcast. + * Default value: **back** when the system language is English. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backButtonIcon(icon: string | PixelMap | Resource | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavigationAttribute; @@ -2840,7 +3155,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideNavBar(value: boolean): NavigationAttribute; @@ -2890,7 +3206,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle, options?: NavigationTitleOptions): NavigationAttribute; @@ -2934,7 +3251,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(value: boolean): NavigationAttribute; @@ -2950,7 +3268,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideTitleBar(hide: boolean, animated: boolean): NavigationAttribute; @@ -2985,7 +3304,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideBackButton(value: boolean): NavigationAttribute; @@ -3017,7 +3337,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ titleMode(value: NavigationTitleMode): NavigationAttribute; @@ -3058,7 +3379,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ menus(value: Array | CustomBuilder): NavigationAttribute; @@ -3071,7 +3393,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ menus(items: Array | CustomBuilder, options?: NavigationMenuOptions): NavigationAttribute; @@ -3109,7 +3432,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ toolbarConfiguration(value: Array | CustomBuilder, options?: NavigationToolbarOptions): NavigationAttribute; @@ -3141,7 +3465,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hideToolBar(value: boolean): NavigationAttribute; @@ -3157,7 +3482,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ hideToolBar(hide: boolean, animated: boolean): NavigationAttribute; @@ -3165,11 +3491,15 @@ declare class NavigationAttribute extends CommonMethod { * Enable tool bar adaptation * * @param { Optional } enable - Enable or disable tool bar adaptation. + * Default value: **true**. + * **true**: Enable toolbar adaptation. + * **false**: Disable toolbar adaptation. * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableToolBarAdaptation(enable: Optional): NavigationAttribute; @@ -3201,7 +3531,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; @@ -3233,7 +3564,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; @@ -3246,7 +3578,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNavigationModeChange(callback: (mode: NavigationMode) => void): NavigationAttribute; @@ -3275,6 +3608,19 @@ declare class NavigationAttribute extends CommonMethod { */ navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; + /** + * Set builder for user-defined NavDestination component. + * + * @param { PageMapBuilder | undefined } builder - The builder function of NavDestination component. + * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + navDestination(builder: PageMapBuilder | undefined): NavigationAttribute; + /** * Set custom navigation content transition animation. * @@ -3292,7 +3638,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customNavContentTransition(delegate: (from: NavContentInfo, to: NavContentInfo, operation: NavigationOperation) => NavigationAnimatedTransition | undefined): NavigationAttribute; @@ -3307,7 +3654,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ignoreLayoutSafeArea(types?: Array, edges?: Array): NavigationAttribute; @@ -3318,7 +3666,8 @@ declare class NavigationAttribute extends CommonMethod { * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ systemBarStyle(style: Optional): NavigationAttribute; @@ -3327,9 +3676,13 @@ declare class NavigationAttribute extends CommonMethod { * To enable this attribute, a navigation id must be set. * * @param { boolean } recoverable - navigation can be recovered. + * Default value: **false**. + * **true**: The **Navigation** component is recoverable. + * **false**: The **Navigation** component is not recoverable. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ recoverable(recoverable: Optional): NavigationAttribute; @@ -3337,11 +3690,15 @@ declare class NavigationAttribute extends CommonMethod { * Enable dragbar * * @param { Optional } isEnabled - enable dragbar or disable dragbar. - * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. + * Default value: **false**. + * **true**: Enable the drag bar. + * **false**: Disable the drag bar. + * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableDragBar(isEnabled: Optional): NavigationAttribute; @@ -3349,11 +3706,15 @@ declare class NavigationAttribute extends CommonMethod { * whether to enable modeChangeAnimation * * @param { Optional } isEnabled - enableModeChangeAnimation. + * Default value: **true**. + * **true**: Enable the animation for switching between stack and split mode. + * **false**: Disable the animation for switching between stack and split mode. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enableModeChangeAnimation(isEnabled: Optional): NavigationAttribute; @@ -3368,6 +3729,22 @@ declare class NavigationAttribute extends CommonMethod { * @since 20 */ splitPlaceholder(placeholder: ComponentContent): NavigationAttribute; + + /** + * Whether to enable the show or hide lifecycle with bindContentCover. + * The true means that bindContentCover can affect the show or hide lifecycle of Navigation, and the false not. + * + * @param { Optional } isEnabled - enable the show or hide lifecycle with bindContentCover. + * Default value: **true**. + * **true**: The bindContentCover can affect the show or hide lifecycle of Navigation. + * **false**: The bindContentCover can not affect the show or hide lifecycle of Navigation. + * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + enableShowHideWithContentCover(isEnabled: Optional): NavigationAttribute; } /** @@ -3385,7 +3762,8 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavigationAnimatedTransition { /** @@ -3403,7 +3781,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onTransitionEnd?: (success: boolean) => void @@ -3422,7 +3801,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -3434,7 +3814,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isInteractive?: boolean; @@ -3453,7 +3834,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition: (transitionProxy: NavigationTransitionProxy) => void } @@ -3473,7 +3855,8 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare interface NavigationTransitionProxy { /** @@ -3491,7 +3874,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: NavContentInfo; @@ -3510,7 +3894,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: NavContentInfo; @@ -3522,7 +3907,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isInteractive?: boolean; @@ -3539,7 +3925,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; @@ -3555,6 +3942,18 @@ declare interface NavigationTransitionProxy { */ cancelTransition?(): void; + /** + * Notification system transition animation canceled. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + cancelTransition?: VoidCallback; + /** * Updates the progress of this interactive transition animation. (Non-interactive * animations do not support setting the animation progress). @@ -3566,8 +3965,33 @@ declare interface NavigationTransitionProxy { * @since 12 */ updateTransition?(progress: number): void; + + /** + * Notification system transition animation update. + * + * @type { ?UpdateTransitionCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updateTransition?: UpdateTransitionCallback; } +/** + * navigation update transition callback. + * + * @typedef { function } UpdateTransitionCallback + * @param { number } progress - Indicates the process of transition + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type UpdateTransitionCallback = (progress: number) => void; + /** * Navigation content info. * @@ -3583,7 +4007,8 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NavContentInfo { /** @@ -3601,7 +4026,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -3620,7 +4046,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -3639,7 +4066,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: NavDestinationMode; @@ -3650,7 +4078,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ param?: Object; @@ -3661,7 +4090,8 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId?: string; } diff --git a/api/@internal/component/ets/node_container.d.ts b/api/@internal/component/ets/node_container.d.ts index 074ad34b57e164e1dc2971b4b2283886be3a61d0..85dde515625b7cba65a8ee30830df501c9d15737 100644 --- a/api/@internal/component/ets/node_container.d.ts +++ b/api/@internal/component/ets/node_container.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { NodeController } from '../../@ohos.arkui.node'; +import { CommonMethod } from './common'; +/*** endif */ + /** * Defines the Interface of NodeContainer. To display the node build by an associated NodeController. * @@ -33,7 +38,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface NodeContainerInterface { /** @@ -56,6 +62,18 @@ interface NodeContainerInterface { * @since 12 */ (controller: import('../api/@ohos.arkui.node').NodeController): NodeContainerAttribute; + /** + * Constructor parameters + * + * @param { NodeController } controller - Indicates the controller of the NodeContainer. + * @returns { NodeContainerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (controller: NodeController): NodeContainerAttribute; } /** @@ -71,7 +89,8 @@ interface NodeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class NodeContainerAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/page_transition.d.ts b/api/@internal/component/ets/page_transition.d.ts index 1ee6c15fac5035805d5b306b9d36fde7df14bbf9..3fa1e1de7d7081b81be0e216437b04290591c5f6 100644 --- a/api/@internal/component/ets/page_transition.d.ts +++ b/api/@internal/component/ets/page_transition.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ICurve, TranslateOptions, ScaleOptions } from './common'; +import { Curve } from './enums'; +/*** endif */ + /** * Declare the jump method. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RouteType { /** @@ -62,7 +68,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -85,7 +92,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Push, @@ -108,7 +116,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Pop, } @@ -135,7 +144,8 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SlideEffect { /** @@ -157,7 +167,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Left, @@ -180,7 +191,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Right, @@ -203,7 +215,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Top, @@ -226,7 +239,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Bottom, @@ -236,7 +250,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 5, @@ -246,7 +261,8 @@ declare enum SlideEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 6, } @@ -435,6 +451,69 @@ declare class CommonTransition { opacity(value: number): T; } +/** + * Provides interfaces for common transitions. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class CommonTransition { + /** + * Called when the slide in effect of the transition is set. + * + * @param { SlideEffect } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + slide(value: SlideEffect): this; + + /** + * Called when the translation effect of page transition is set. + * + * @param { TranslateOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + translate(value: TranslateOptions): this; + + /** + * Called when setting the zoom effect of page transition. + * + * @param { ScaleOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale(value: ScaleOptions): this; + + /** + * Called when the transparency value of the starting point of entry or the ending point of exit is set. + * + * @param { number } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + opacity(value: number): this; +} + /** * Defines pageTransition constructor parameters. * @@ -457,51 +536,54 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PageTransitionOptions { /** - * RouteType in which the pageTransition can work. + * RouteType in which the pageTransition can work. default value is RouteType.None. * @type { ?RouteType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * RouteType in which the pageTransition can work. + * RouteType in which the pageTransition can work. default value is RouteType.None. * @type { ?RouteType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * RouteType in which the pageTransition can work. + * RouteType in which the pageTransition can work. default value is RouteType.None. * @type { ?RouteType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type?: RouteType; /** - * PageTransition animation duration, in ms. + * PageTransition animation duration, in ms. default value is 1000. * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * PageTransition animation duration, in ms. + * PageTransition animation duration, in ms. default value is 1000. * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * PageTransition animation duration, in ms. + * PageTransition animation duration, in ms. default value is 1000. * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -526,18 +608,19 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | string | ICurve; /** - * PageTransition animation delay time, in ms. + * PageTransition animation delay time, in ms. default value is 0. * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * PageTransition animation delay time, in ms. + * PageTransition animation delay time, in ms. default value is 0. * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -545,13 +628,14 @@ declare interface PageTransitionOptions { * @since 10 */ /** - * PageTransition animation delay time, in ms. + * PageTransition animation delay time, in ms. default value is 0. * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; } @@ -565,7 +649,8 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PageTransitionCallback = (type: RouteType, progress: number) => void; @@ -670,6 +755,47 @@ interface PageTransitionEnterInterface extends CommonTransition = [T1, T2]; @@ -36,7 +44,8 @@ declare type ParticleTuple = [T1, T2]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VelocityOptions { /** @@ -56,13 +65,14 @@ declare interface VelocityOptions { */ /** * Particle speed. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ speed: ParticleTuple; @@ -83,13 +93,14 @@ declare interface VelocityOptions { */ /** * Angle of particle's direction. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ angle: ParticleTuple; } @@ -124,7 +135,7 @@ declare interface AccelerationOptions< */ /** * Speed property options. - * + * * Anonymous Object Rectification. * @type { ?ParticlePropertyOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -151,7 +162,7 @@ declare interface AccelerationOptions< */ /** * Angle property options. - * + * * Anonymous Object Rectification. * @type { ?ParticlePropertyOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -162,6 +173,42 @@ declare interface AccelerationOptions< angle?: ParticlePropertyOptions; } +/** + * Defines acceleration options. + * + * @interface AccelerationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AccelerationOptions { + /** + * Speed property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + speed?: ParticlePropertyOptions; + + /** + * Angle property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + angle?: ParticlePropertyOptions; +} + /** * Defines the ParticleOptions Interface. * @interface ParticleOptions @@ -279,7 +326,7 @@ interface ParticleOptions< */ /** * Particle velocity. - * + * * Anonymous Object Rectification. * @type { ?VelocityOptions } * @default {speed:[0,0];angle:[0,0]} @@ -309,7 +356,7 @@ interface ParticleOptions< */ /** * Particle acceleration. - * + * * Anonymous Object Rectification. * @type { ?AccelerationOptions } * @default {speed:{range:[0,0]};angle:{range:[0,0]}} @@ -340,6 +387,102 @@ interface ParticleOptions< spin?: ParticlePropertyOptions; } +/** + * Defines the ParticleOptions Interface. + * @interface ParticleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleOptions { + /** + * Particle emitter. + * @type { EmitterOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + emitter: EmitterOptions; + + /** + * Particle color. + * @type { ?ParticleColorPropertyOptions } + * @default {range:['#FFFFFF','#FFFFFF']} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ParticleColorPropertyOptions; + + /** + * Particle opacity. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + opacity?: ParticlePropertyOptions; + + /** + * Particle scale. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scale?: ParticlePropertyOptions; + + /** + * Particle velocity. + * + * @type { ?VelocityOptions } + * @default {speed:[0,0];angle:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + velocity?: VelocityOptions; + + /** + * Particle acceleration. + * + * @type { ?AccelerationOptions } + * @default {speed:{range:[0,0]};angle:{range:[0,0]}} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + acceleration?: AccelerationOptions; + + /** + * Particle spin. + * @type { ?ParticlePropertyOptions } + * @default {range:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + spin?: ParticlePropertyOptions; +} + /** * Defines the parameters for a point-like particle. * @interface PointParticleParameters @@ -353,7 +496,8 @@ interface ParticleOptions< * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface PointParticleParameters { /** @@ -369,7 +513,8 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radius: VP; } @@ -387,7 +532,8 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageParticleParameters { /** @@ -403,7 +549,8 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ src: ResourceStr; @@ -424,13 +571,14 @@ interface ImageParticleParameters { */ /** * Particle image size. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ size: ParticleTuple; @@ -449,7 +597,8 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; } @@ -505,6 +654,17 @@ interface ParticleConfigs { [ParticleType.IMAGE]: ImageParticleParameters; } +/** + * Defines the particle configs. + * @typedef {PointParticleParameters | ImageParticleParameters} ParticleConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters; + /** * Defines the emitter property. * @@ -512,7 +672,8 @@ interface ParticleConfigs { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EmitterProperty { @@ -523,7 +684,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -534,7 +696,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ emitRate?: number; @@ -545,7 +708,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position?: PositionT; @@ -556,7 +720,8 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeT; @@ -568,8 +733,9 @@ interface EmitterProperty { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - annulusRegion?: ParticleAnnulusRegion; + annulusRegion?: ParticleAnnulusRegion; } /** @@ -599,7 +765,7 @@ interface EmitterParticleOptions { */ /** * Particle type. - * + * * Anonymous Object Rectification. * @type { PARTICLE } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -625,7 +791,7 @@ interface EmitterParticleOptions { */ /** * Particle config. - * + * * Anonymous Object Rectification. * @type { ParticleConfigs[PARTICLE] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -652,7 +818,7 @@ interface EmitterParticleOptions { */ /** * Particle count. - * + * * Anonymous Object Rectification. * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -681,7 +847,7 @@ interface EmitterParticleOptions { */ /** * Particle lifetime. - * + * * Anonymous Object Rectification. * @type { ?number } * @default 1000 @@ -705,7 +871,7 @@ interface EmitterParticleOptions { /** * Particle lifetimeRange,value range [0, ∞). * when lifetimeRange>lifetime,minimum lifetime is 0. - * + * * Anonymous Object Rectification. * @type { ?number } * @default 0 @@ -717,6 +883,81 @@ interface EmitterParticleOptions { lifetimeRange?: number; } +/** + * Defines parameters of particles used by emitters. + * + * @interface EmitterParticleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EmitterParticleOptions { + /** + * Particle type. + * + * @type { ParticleType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleType; + + /** + * Particle config. + * + * @type { ParticleConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticleConfigs; + + /** + * Particle count. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + count: number; + + /** + * Particle lifetime. + * + * @type { ?number } + * @default 1000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + lifetime?: number; + + /** + * Particle lifetimeRange,value range [0, ∞). + * when lifetimeRange>lifetime,minimum lifetime is 0. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + lifetimeRange?: number; +} + /** * Defines the emitter Options. * @interface EmitterOptions @@ -750,7 +991,7 @@ interface EmitterOptions { */ /** * Set particle config. - * + * * Anonymous Object Rectification. * @type { EmitterParticleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -823,7 +1064,7 @@ interface EmitterOptions { * Position of emitter. * The first element means X-axis location. * The second element means the Y-axis location. - * + * * Anonymous Object Rectification. * @type { ?ParticleTuple } * @default [0,0] @@ -845,28 +1086,117 @@ interface EmitterOptions { * @since 10 */ /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * @type { ?[Dimension, Dimension] } - * @default ['100%','100%'] + * Size of emitter. + * The first element means emitter width. + * The second element means emitter height. + * @type { ?[Dimension, Dimension] } + * @default ['100%','100%'] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Size of emitter. + * The first element means emitter width. + * The second element means emitter height. + * + * Anonymous Object Rectification. + * @type { ?ParticleTuple } + * @default ['100%','100%'] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + size?: ParticleTuple; + + /** + * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. + * + * @type { ?ParticleAnnulusRegion } + * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + annulusRegion?: ParticleAnnulusRegion; +} + +/** + * Defines the emitter Options. + * @interface EmitterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface EmitterOptions { + /** + * Set particle config. + * + * @type { EmitterParticleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + particle: EmitterParticleOptions; + + /** + * Emitting rate, that is, the number of particles produced per second. + * @type { ?number } + * @default 5 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + emitRate?: number; + + /** + * Shape of emitter. + * @type { ?ParticleEmitterShape } + * @default ParticleEmitterShape.RECTANGLE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + shape?: ParticleEmitterShape; + + /** + * Position of emitter. + * The first element means X-axis location. + * The second element means the Y-axis location. + * + * @type { ?ParticleTuple } + * @default [0,0] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since 20 + * @arkts 1.2 */ + position?: ParticleTuple; + /** * Size of emitter. * The first element means emitter width. * The second element means emitter height. - * - * Anonymous Object Rectification. + * * @type { ?ParticleTuple } * @default ['100%','100%'] * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 + * @arkts 1.2 */ size?: ParticleTuple; @@ -879,6 +1209,7 @@ interface EmitterOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.2 */ annulusRegion?: ParticleAnnulusRegion; } @@ -935,7 +1266,7 @@ interface ParticlePropertyUpdaterConfigs { */ /** * Random effect of particle updater. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -963,6 +1294,18 @@ interface ParticlePropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } +/** + * Defines the particle property updater configs. + * @typedef { undefined | ParticleTuple | Array> } ParticlePropertyUpdaterConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticlePropertyUpdaterConfigs = undefined | ParticleTuple | Array>; + + /** * Defines the particle updater options. * @@ -990,7 +1333,7 @@ interface ParticleUpdaterOptions { */ /** * Particle updater type. - * + * * Anonymous Object Rectification. * @type { UPDATER } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1017,7 +1360,7 @@ interface ParticleUpdaterOptions { */ /** * Particle updater configuration. - * + * * Anonymous Object Rectification. * @type { ParticlePropertyUpdaterConfigs[UPDATER] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1028,6 +1371,42 @@ interface ParticleUpdaterOptions { config: ParticlePropertyUpdaterConfigs[UPDATER]; } +/** + * Defines the particle updater options. + * + * @typedef ParticleUpdaterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleUpdaterOptions { + /** + * Particle updater type. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleUpdater; + + /** + * Particle updater configuration. + * + * @type { ParticlePropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticlePropertyUpdaterConfigs; +} + /** * Defines the particle color options. * @@ -1035,7 +1414,8 @@ interface ParticleUpdaterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ParticleColorOptions { /** @@ -1055,13 +1435,14 @@ interface ParticleColorOptions { */ /** * Red component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ r: ParticleTuple; @@ -1082,13 +1463,14 @@ interface ParticleColorOptions { */ /** * Green component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ g: ParticleTuple; @@ -1109,13 +1491,14 @@ interface ParticleColorOptions { */ /** * Blue component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ b: ParticleTuple; @@ -1136,13 +1519,14 @@ interface ParticleColorOptions { */ /** * Opacity component of particle color. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ a: ParticleTuple; } @@ -1174,7 +1558,7 @@ interface ParticleColorUpdaterOptions { */ /** * Color updater. - * + * * Anonymous Object Rectification. * @type { UPDATER } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1201,7 +1585,7 @@ interface ParticleColorUpdaterOptions { */ /** * Color updater configuration. - * + * * Anonymous Object Rectification. * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1212,6 +1596,42 @@ interface ParticleColorUpdaterOptions { config: ParticleColorPropertyUpdaterConfigs[UPDATER]; } +/** + * Defines the particle color updater options. + * + * @interface ParticleColorUpdaterOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleColorUpdaterOptions { + /** + * Color updater. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: ParticleUpdater; + + /** + * Color updater configuration. + * + * @type { ParticleColorPropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + config: ParticleColorPropertyUpdaterConfigs; +} + /** * Defines the particle property Options. * @interface ParticlePropertyOptions @@ -1245,7 +1665,7 @@ interface ParticlePropertyOptions { */ /** * Initial range, within which the initial value are randomly generated. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1274,7 +1694,7 @@ interface ParticlePropertyOptions { */ /** * Particle property updater. - * + * * Anonymous Object Rectification. * @type { ?ParticleUpdaterOptions } * @default {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs[UPDATER.NONE]} @@ -1286,6 +1706,42 @@ interface ParticlePropertyOptions { updater?: ParticleUpdaterOptions; } +/** + * Defines the particle property Options. + * @interface ParticlePropertyOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticlePropertyOptions { + /** + * Initial range, within which the initial value are randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + range: ParticleTuple; + + /** + * Particle property updater. + * + * @type { ?ParticleUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updater?: ParticleUpdaterOptions; +} + /** * Defines the particle color property updater configs. * @interface ParticleColorPropertyUpdaterConfigs @@ -1338,7 +1794,7 @@ interface ParticleColorPropertyUpdaterConfigs { */ /** * Random effect of particle color property updater. - * + * * Anonymous Object Rectification. * @type { ParticleColorOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1368,6 +1824,17 @@ interface ParticleColorPropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } +/** + * Defines the particle color property updater configs. + * @typedef {undefined | ParticleColorOptions | Array>} ParticleColorPropertyUpdaterConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ParticleColorPropertyUpdaterConfigs = undefined | ParticleColorOptions | Array>; + /** * Defines the particle color property updater configs which can support generics. * @interface ParticleColorPropertyOptions @@ -1401,7 +1868,7 @@ interface ParticleColorPropertyOptions { */ /** * Initial color range, within which the initial color is randomly generated. - * + * * Anonymous Object Rectification. * @type { ParticleTuple } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1441,7 +1908,7 @@ interface ParticleColorPropertyOptions { */ /** * Particle color property updater. - * + * * Anonymous Object Rectification. * @type { ?ParticleColorUpdaterOptions } * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]} @@ -1453,6 +1920,54 @@ interface ParticleColorPropertyOptions { updater?: ParticleColorUpdaterOptions; } +/** + * Defines the particle color property updater. + * @interface ParticleColorPropertyOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ParticleColorPropertyOptions { + /** + * Initial color range, within which the initial color is randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + range: ParticleTuple; + + /** + * Distribution type of particle color. + * @type { ?DistributionType } + * @default DistributionType.UNIFORM + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + distributionType?: DistributionType; + + /** + * Particle color property updater. + * + * @type { ?ParticleColorUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + updater?: ParticleColorUpdaterOptions; +} + /** * Defines the particle property lifecycle. * @interface ParticlePropertyAnimation @@ -1466,7 +1981,8 @@ interface ParticleColorPropertyOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ParticlePropertyAnimation { /** @@ -1482,7 +1998,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ from: T; @@ -1499,7 +2016,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ to: T; @@ -1516,7 +2034,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMillis: number; @@ -1533,7 +2052,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMillis: number; @@ -1552,7 +2072,8 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | ICurve; } @@ -1592,7 +2113,7 @@ interface Particles< */ /** * Array of particles. - * + * * Anonymous Object Rectification. * @type { Array> } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1613,6 +2134,30 @@ interface Particles< >; } +/** + * Defines the Particles interface. + * + * @interface Particles + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface Particles { + /** + * Array of particles. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + particles: Array; +} + /** * Defines the particle Interface. * @interface ParticleInterface @@ -1650,7 +2195,7 @@ interface ParticleInterface { */ /** * create a particle array. - * + * * Anonymous Object Rectification. * @param { Particles } particles - Array of particles. @@ -1679,6 +2224,23 @@ interface ParticleInterface { >): ParticleAttribute; } +/** + * create a particle array. + * + * @param { Particles } particles - Array of particles. + * @returns { ParticleAttribute } Returns the particle attribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +//@memo +//@ComponentBuilder +export declare function Particle( + particles: Particles +): ParticleAttribute; + /** * Enumerates the particle types. * @enum { string } @@ -1692,7 +2254,8 @@ interface ParticleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleType { /** @@ -1706,7 +2269,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ POINT = 'point', @@ -1721,7 +2285,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 'image', } @@ -1739,7 +2304,8 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleEmitterShape { /** @@ -1753,7 +2319,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RECTANGLE = 'rectangle', @@ -1768,7 +2335,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLE = 'circle', @@ -1783,7 +2351,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ELLIPSE = 'ellipse', @@ -1793,8 +2362,9 @@ declare enum ParticleEmitterShape { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - ANNULUS = 'annulus', + ANNULUS = 'annulus', } /** @@ -1804,7 +2374,8 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DistributionType { /** @@ -1813,7 +2384,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNIFORM = 0, @@ -1823,7 +2395,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GAUSSIAN = 1, } @@ -1841,7 +2414,8 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ParticleUpdater { /** @@ -1855,7 +2429,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 'none', @@ -1870,7 +2445,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RANDOM = 'random', @@ -1885,7 +2461,8 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CURVE = 'curve', } @@ -1925,7 +2502,8 @@ declare type PositionT = import('../api/arkui/Graphics').PositionT; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ParticleAttribute extends CommonMethod { /** @@ -1936,7 +2514,8 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disturbanceFields(fields: Array): ParticleAttribute; @@ -1948,9 +2527,10 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - emitter(value : Array) : ParticleAttribute; + emitter(value: Array): ParticleAttribute; } /** @@ -1974,7 +2554,8 @@ declare const Particle: ParticleInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DisturbanceFieldOptions { @@ -1988,7 +2569,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strength?: number; @@ -2000,7 +2582,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shape?: DisturbanceFieldShape; @@ -2012,7 +2595,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeT; @@ -2024,7 +2608,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position?: PositionT; @@ -2040,7 +2625,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ feather?: number; @@ -2052,7 +2638,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseScale?: number; @@ -2064,7 +2651,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseFrequency?: number; @@ -2076,7 +2664,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ noiseAmplitude?: number; } @@ -2088,7 +2677,8 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DisturbanceFieldShape { @@ -2098,19 +2688,21 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - RECT, + RECT = 0, - /** + /** * Shape circle. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - CIRCLE, + CIRCLE = 1, /** * Shape eclipse. @@ -2118,9 +2710,10 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - ELLIPSE + ELLIPSE = 2 } @@ -2131,6 +2724,7 @@ declare enum DisturbanceFieldShape { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface ParticleAnnulusRegion { /** @@ -2142,6 +2736,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ center?: PositionT, /** @@ -2152,6 +2747,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ outerRadius: LengthMetrics, /** @@ -2162,6 +2758,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ innerRadius: LengthMetrics, /** @@ -2173,6 +2770,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ startAngle?: number, /** @@ -2184,6 +2782,7 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ endAngle?: number, } diff --git a/api/@internal/component/ets/path.d.ts b/api/@internal/component/ets/path.d.ts index 924c278aab7f3d87fd494716412e1134c466ef20..6cf77a744f8bd8442dd75552c6e2de22dcef6a5b 100644 --- a/api/@internal/component/ets/path.d.ts +++ b/api/@internal/component/ets/path.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +/*** endif */ + /** * Define options used to construct a path. * @@ -26,7 +30,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PathOptions { /** @@ -80,6 +85,17 @@ declare interface PathOptions { * @since 20 */ width?: Length; + /** + * Width option. + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: number | string; /** * Height option. @@ -132,6 +148,17 @@ declare interface PathOptions { * @since 20 */ height?: Length; + /** + * Height option. + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: number | string; /** * Commands option. @@ -184,6 +211,17 @@ declare interface PathOptions { * @since 20 */ commands?: ResourceStr; + /** + * Commands option. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + commands?: string } /** @@ -358,7 +396,8 @@ interface PathInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PathAttribute extends CommonShapeMethod { /** @@ -411,6 +450,19 @@ declare class PathAttribute extends CommonShapeMethod { * @since 20 */ commands(value: ResourceStr): PathAttribute; + /** + * Called when the command string drawn by the path is set. + * + * @param { string } value + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + commands(value: string): PathAttribute; } /** @@ -476,3 +528,30 @@ declare const Path: PathInterface; * @since 11 */ declare const PathInstance: PathAttribute; + +/** + * Provides the path drawing interface. + * + * @interface PathInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PathInterface { + /** + * Called when drawing path. + * + * @param { PathOptions } [options] - path options + * @returns { PathAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PathOptions): PathAttribute; +} \ No newline at end of file diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 5abde1178a519bb625045f790d2380bebb58d81c..36a2b0141dd476bced1646e8529ea5a2099b9bec 100644 --- a/api/@internal/component/ets/pattern_lock.d.ts +++ b/api/@internal/component/ets/pattern_lock.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Length } from './units' +import { LengthMetrics } from '../Graphics' +import { CommonMethod, Callback, Optional } from './common' +/*** endif */ + /** * The challenge result based on input pattern for control pattern lock component. * @enum { number } @@ -31,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PatternLockChallengeResult { /** @@ -45,7 +52,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CORRECT = 1, /** @@ -59,7 +67,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WRONG = 2 } @@ -71,7 +80,8 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CircleStyleOptions { /** @@ -81,7 +91,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -92,7 +103,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: LengthMetrics; @@ -103,7 +115,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableWaveEffect?: boolean; @@ -114,9 +127,10 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - enableForeground?: boolean; + enableForeground?: boolean; } /** @@ -138,7 +152,8 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PatternLockController { /** @@ -160,7 +175,8 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -186,6 +202,16 @@ declare class PatternLockController { * @since 12 */ reset(); + /** + * Reset pattern lock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reset(): void; /** * Set challenge result. @@ -200,7 +226,8 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setChallengeResult(result: PatternLockChallengeResult): void; } @@ -227,7 +254,8 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PatternLockInterface { /** @@ -255,7 +283,8 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: PatternLockController): PatternLockAttribute; } @@ -282,7 +311,8 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PatternLockAttribute extends CommonMethod { /** @@ -314,7 +344,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sideLength(value: Length): PatternLockAttribute; @@ -347,7 +378,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ circleRadius(value: Length): PatternLockAttribute; @@ -376,7 +408,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): PatternLockAttribute; @@ -405,7 +438,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ regularColor(value: ResourceColor): PatternLockAttribute; @@ -434,7 +468,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): PatternLockAttribute; @@ -463,7 +498,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activeColor(value: ResourceColor): PatternLockAttribute; @@ -492,7 +528,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathColor(value: ResourceColor): PatternLockAttribute; @@ -525,7 +562,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathStrokeWidth(value: number | string): PatternLockAttribute; @@ -554,7 +592,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPatternComplete(callback: (input: Array) => void): PatternLockAttribute; @@ -585,7 +624,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ autoReset(value: boolean): PatternLockAttribute; @@ -608,7 +648,19 @@ declare class PatternLockAttribute extends CommonMethod { * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; - + + /** + * Called when connecting to a grid dot. + * @param { Callback } callback - A callback instance used when connection to a grid dot. + * @returns { PatternLockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDotConnect(callback: Callback): PatternLockAttribute; + /** * Sets the background circle style for the dots in a grid when they are in the activated state. * @@ -617,7 +669,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activateCircleStyle(options: Optional): PatternLockAttribute; @@ -630,7 +683,8 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ skipUnselectedPoint(skipped: boolean): PatternLockAttribute; } diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index 62733df68dffaaa268b70e83c2f9b191c9f474a5..c5749cdb6a647b081fe9f5f70347bb10aaae99aa 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -18,13 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +import { VoidCallback } from './units' +/*** endif */ + /** * PluginComponentTemplate * * @interface PluginComponentTemplate * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface PluginComponentTemplate { /** @@ -33,7 +39,8 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ source: string; /** @@ -42,7 +49,8 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; } @@ -54,7 +62,8 @@ interface PluginComponentTemplate { * @interface PluginComponentOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PluginComponentOptions { /** @@ -70,7 +79,8 @@ declare interface PluginComponentOptions { * @type { PluginComponentTemplate } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ template: PluginComponentTemplate; @@ -90,6 +100,16 @@ declare interface PluginComponentOptions { * @since 18 */ data: any; + /** + * Plugin component data. + * AnonyMous Object Rectification + * @type { Object|undefined|null } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + data: Object|undefined|null; } /** @@ -99,7 +119,8 @@ declare interface PluginComponentOptions { * @interface PluginErrorData * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PluginErrorData { /** @@ -115,7 +136,8 @@ declare interface PluginErrorData { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ errcode: number; @@ -132,7 +154,8 @@ declare interface PluginErrorData { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ msg: string; } @@ -145,7 +168,8 @@ declare interface PluginErrorData { * @param { PluginErrorData } info - Plugin error data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PluginErrorCallback = (info: PluginErrorData) => void; @@ -155,7 +179,8 @@ declare type PluginErrorCallback = (info: PluginErrorData) => void; * @interface PluginComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface PluginComponentInterface { /** @@ -175,7 +200,8 @@ interface PluginComponentInterface { * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options: PluginComponentOptions): PluginComponentAttribute; } @@ -186,7 +212,8 @@ interface PluginComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PluginComponentAttribute extends CommonMethod { /** @@ -206,7 +233,8 @@ declare class PluginComponentAttribute extends CommonMethod { /** @@ -349,6 +380,20 @@ declare class PolygonAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolygonAttribute; + + /** + * Called when the vertex coordinate list of a polygon is set. + * + * @param { Array } value + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + points(value: Array): PolygonAttribute; } /** @@ -414,3 +459,30 @@ declare const Polygon: PolygonInterface; * @since 11 */ declare const PolygonInstance: PolygonAttribute; + +/** + * Provides the polygon drawing interface. + * + * @interface PolygonInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PolygonInterface { + /** + * Called when drawing a polygon. + * + * @param { PolygonOptions } [options] - Polygon options + * @returns { PolygonAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PolygonOptions): PolygonAttribute; +} diff --git a/api/@internal/component/ets/polyline.d.ts b/api/@internal/component/ets/polyline.d.ts index d2ddef1e828d1bd8db41aede69c7303d21d3a849..924ddd3d60a2100e2f0ce672b920da30a95769ce 100644 --- a/api/@internal/component/ets/polyline.d.ts +++ b/api/@internal/component/ets/polyline.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +import { ShapePoint } from './line'; +/*** endif */ + /** * Define options used to construct a polyline. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PolylineOptions { /** @@ -63,7 +69,7 @@ declare interface PolylineOptions { * @atomicservice * @since 11 */ - /** +/** * Polyline width. * Anonymous Object Rectification. * @@ -85,6 +91,18 @@ declare interface PolylineOptions { * @since 20 */ width?: Length; + /** + * Polyline width. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: string | number; /** * Polyline height. @@ -120,7 +138,7 @@ declare interface PolylineOptions { * @atomicservice * @since 11 */ - /** +/** * Polyline height. * Anonymous Object Rectification. * @@ -142,6 +160,18 @@ declare interface PolylineOptions { * @since 20 */ height?: Length; + /** + * Polyline height. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: string | number } /** @@ -300,7 +330,8 @@ interface PolylineInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class PolylineAttribute extends CommonShapeMethod { /** @@ -342,6 +373,20 @@ declare class PolylineAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolylineAttribute; + + /** + * Called when the polyline is set to pass through the coordinate point list. + * + * @param { Array } value + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + points(value: Array): PolylineAttribute; } /** @@ -407,3 +452,30 @@ declare const Polyline: PolylineInterface; * @since 11 */ declare const PolylineInstance: PolylineAttribute; + +/** + * Provides an interface for drawing polylines. + * + * @interface PolylineInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface PolylineInterface { + /** + * Set options for polyline component. + * + * @param { PolylineOptions } [options] - Poly line options + * @returns { PolylineAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options?: PolylineOptions): PolylineAttribute; +} diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 4bd94cb93ac49b7025ded7408b59b14bd8a39e60..576a6af377898be7b24281120fb75fe03281d19b 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor,Length, PX , VP , LPX, Font, ResourceStr } from './units' +import { Resource } from '../../global/resource'; +import { CommonMethod, Optional,ContentModifier,CommonConfiguration } from './common' +import { LinearGradient } from './dataPanel' +import { LengthMetrics } from '../Graphics' +/*** endif */ + /** * Defines the option of Progress. * @@ -173,6 +181,58 @@ declare interface ProgressOptions { type?: Type } +/** + * Defines the option of Progress. + * + * @interface ProgressOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface ProgressOptions { + + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + total?: number; + + /** + * Sets the type of Progress. + * + * @type { ?ProgressType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type?: ProgressType +} /** * Type of progress bar * @@ -205,7 +265,8 @@ declare interface ProgressOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressType { /** @@ -236,7 +297,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear = 0, @@ -268,7 +330,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ring = 1, @@ -300,7 +363,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Eclipse = 2, @@ -332,7 +396,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleRing = 3, @@ -364,7 +429,8 @@ declare enum ProgressType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule = 4 } @@ -383,7 +449,8 @@ declare enum ProgressType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressStatus { /** @@ -398,7 +465,8 @@ declare enum ProgressStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING, @@ -414,7 +482,8 @@ declare enum ProgressStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PROGRESSING } @@ -455,7 +524,8 @@ declare enum ProgressStatus { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { /** @@ -490,7 +560,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -526,7 +597,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleCount?: number; @@ -562,7 +634,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleWidth?: Length; } @@ -581,7 +654,8 @@ declare interface ProgressStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CommonProgressStyleOptions { /** @@ -600,7 +674,8 @@ declare interface CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableSmoothEffect?: boolean; } @@ -619,7 +694,8 @@ declare interface CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScanEffectOptions { /** @@ -638,7 +714,8 @@ declare interface ScanEffectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableScanEffect?: boolean; } @@ -658,7 +735,8 @@ declare interface ScanEffectOptions { * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EclipseStyleOptions extends CommonProgressStyleOptions { @@ -680,7 +758,8 @@ declare interface EclipseStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { /** @@ -697,7 +776,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -715,7 +795,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleWidth?: Length; @@ -733,7 +814,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scaleCount?: number; } @@ -754,7 +836,8 @@ declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -771,7 +854,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; @@ -789,7 +873,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: boolean; @@ -807,7 +892,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status?: ProgressStatus; } @@ -828,7 +914,8 @@ declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyl * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -845,7 +932,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; /** @@ -864,7 +952,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeRadius?: PX | VP | LPX | Resource; } @@ -885,7 +974,8 @@ declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { /** @@ -902,7 +992,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderColor?: ResourceColor; @@ -920,7 +1011,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderWidth?: Length; @@ -951,6 +1043,18 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS */ content?: ResourceStr; + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + content?: string; + /** * Set the text style. * @@ -965,7 +1069,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; @@ -983,7 +1088,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -1003,7 +1109,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showDefaultPercentage?: boolean; @@ -1015,7 +1122,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: LengthMetrics; } @@ -1052,7 +1160,8 @@ declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressS * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProgressStyle { /** @@ -1083,7 +1192,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Linear, @@ -1115,7 +1225,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Ring, @@ -1147,7 +1258,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Eclipse, @@ -1179,7 +1291,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ScaleRing, @@ -1211,7 +1324,8 @@ declare enum ProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Capsule, } @@ -1229,7 +1343,8 @@ declare enum ProgressStyle { * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ProgressStyleMap { /** @@ -1345,7 +1460,8 @@ declare interface ProgressStyleMap { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ProgressInterface { /** @@ -1387,6 +1503,19 @@ interface ProgressInterface { * @since 11 */ (options: ProgressOptions): ProgressAttribute; + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options: ProgressOptions): ProgressAttribute; } /** @@ -1571,6 +1700,88 @@ declare class ProgressAttribute): ProgressAttribute; } +/** + * Defines the progress attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare class ProgressAttribute extends CommonMethod { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value(value: number): ProgressAttribute; + + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color(value: ResourceColor | LinearGradient): ProgressAttribute; + + /** + * Called when the style of progress bar is set. + * + * @param { LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + style(value: LinearStyleOptions | RingStyleOptions | CapsuleStyleOptions | ProgressStyleOptions): ProgressAttribute; + + /** + * Sets if mark to privacy sensitive. + * + * @param { Optional } isPrivacySensitiveMode - indicates if mark to privacy sensitive. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + privacySensitive(isPrivacySensitiveMode: Optional): ProgressAttribute; + + /** + * Set the contentModifier of progress. + * + * @param { ContentModifier } modifier - The contentModifier of progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + contentModifier(modifier: ContentModifier): ProgressAttribute; +} + /** * ProgressConfiguration used by progress contentModifier * @@ -1579,7 +1790,8 @@ declare class ProgressAttribute { /** @@ -1589,7 +1801,8 @@ declare interface ProgressConfiguration extends CommonConfiguration { /** @@ -176,7 +199,8 @@ declare class QRCodeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): QRCodeAttribute; @@ -216,7 +240,8 @@ declare class QRCodeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor(value: ResourceColor): QRCodeAttribute; @@ -235,7 +260,8 @@ declare class QRCodeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentOpacity(value: number | Resource): QRCodeAttribute; } diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts index e104103f9693eb47145ad64c591512d63787253e..8e5981497572c19ca1d1b05a0917c5bb7230cb9c 100644 --- a/api/@internal/component/ets/radio.d.ts +++ b/api/@internal/component/ets/radio.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, ContentModifier, CommonConfiguration, Callback } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor } from './units'; +/*** endif */ + /** * Defines the IndicatorType of Radio component * @@ -26,7 +32,8 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RadioIndicatorType { /** @@ -36,7 +43,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TICK = 0, /** @@ -46,7 +54,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOT = 1, /** @@ -56,7 +65,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM = 2, } @@ -93,7 +103,8 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioOptions { /** @@ -128,7 +139,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ group: string; @@ -164,7 +176,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; /** @@ -175,7 +188,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorType?: RadioIndicatorType; /** @@ -186,7 +200,8 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorBuilder?: CustomBuilder; } @@ -206,7 +221,8 @@ declare interface RadioOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioStyle { /** @@ -226,7 +242,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ checkedBackgroundColor?: ResourceColor; @@ -247,7 +264,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ uncheckedBorderColor?: ResourceColor; @@ -268,7 +286,8 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorColor?: ResourceColor; } @@ -305,7 +324,8 @@ declare interface RadioStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RadioInterface { /** @@ -344,7 +364,8 @@ interface RadioInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: RadioOptions): RadioAttribute; } @@ -356,7 +377,8 @@ interface RadioInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnRadioChangeCallback = (isChecked: boolean) => void; @@ -392,7 +414,8 @@ declare type OnRadioChangeCallback = (isChecked: boolean) => void; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RadioAttribute extends CommonMethod { /** @@ -431,7 +454,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ checked(value: boolean): RadioAttribute; @@ -444,7 +468,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ checked(isChecked: Optional): RadioAttribute; @@ -497,7 +522,8 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): RadioAttribute; @@ -518,7 +544,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ radioStyle(value?: RadioStyle): RadioAttribute; @@ -530,7 +557,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): RadioAttribute; @@ -542,7 +570,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): RadioAttribute; } @@ -555,7 +584,8 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RadioConfiguration extends CommonConfiguration { /** @@ -565,7 +595,8 @@ declare interface RadioConfiguration extends CommonConfiguration; } diff --git a/api/@internal/component/ets/rating.d.ts b/api/@internal/component/ets/rating.d.ts index 308ed20ef7bd1d1278d618dd7c2c40565aefd26a..30eac91d95218f33fb5f711f3f986bf4c1be4d9b 100644 --- a/api/@internal/component/ets/rating.d.ts +++ b/api/@internal/component/ets/rating.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, Callback, CommonMethod, Optional, ContentModifier, Bindable } from './common' +import { ResourceStr } from './units'; +/*** endif */ + /** * Define options used to construct a rating. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RatingOptions { /** @@ -131,7 +137,8 @@ declare interface RatingOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StarStyleOptions { /** @@ -178,6 +185,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ backgroundUri: ResourceStr; @@ -225,6 +233,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ foregroundUri: ResourceStr; @@ -272,6 +281,7 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ secondaryUri?: ResourceStr } @@ -308,7 +318,8 @@ declare interface StarStyleOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RatingInterface { /** @@ -359,7 +370,8 @@ interface RatingInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RatingOptions): RatingAttribute; } @@ -372,7 +384,8 @@ interface RatingInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -382,7 +395,8 @@ declare interface RatingConfiguration extends CommonConfiguration; } @@ -439,7 +457,8 @@ declare interface RatingConfiguration extends CommonConfiguration void; @@ -475,7 +494,8 @@ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -514,7 +534,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stars(value: number): RatingAttribute; @@ -527,7 +548,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stars(starCount: Optional): RatingAttribute; @@ -567,7 +589,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(value: number): RatingAttribute; @@ -580,7 +603,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(size: Optional): RatingAttribute; @@ -632,7 +656,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ starStyle(options: StarStyleOptions): RatingAttribute; @@ -645,7 +670,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ starStyle(options: Optional): RatingAttribute; @@ -698,7 +724,8 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): RatingAttribute; @@ -710,7 +737,8 @@ declare class RatingAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): RatingAttribute; @@ -722,7 +750,8 @@ declare class RatingAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: Optional>): RatingAttribute; } diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index a382feb79cf29d864fca05a505c21f219dccf129..63e54bf6bfb23f48a4bfbf5ed5534ba3337d8bfe 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -18,6 +18,24 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonShapeMethod } from './common'; +import { Length } from './units'; +/*** endif */ + +/** + * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. + * + * @typedef { [Length, Length] } RadiusItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type RadiusItem = [Length, Length]; + /** * Define options used to construct a rectangle. * @@ -26,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RectOptions { /** @@ -83,6 +102,7 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Length; @@ -140,6 +160,7 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ height?: Length; @@ -199,6 +220,19 @@ declare interface RectOptions { * @since 20 */ radius?: Length | Array; + + /** + * Corner radius of the rectangle. + * + * @type { ?(Length | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + radius?: Length | Array; } /** @@ -209,7 +243,8 @@ declare interface RectOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RoundedRectOptions { /** @@ -621,7 +656,8 @@ interface RectInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RectAttribute extends CommonShapeMethod { /** @@ -776,6 +812,20 @@ declare class RectAttribute extends CommonShapeMethod { * @since 20 */ radius(value: Length | Array): RectAttribute; + + /** + * Called when the fillet size is set. + * + * @param { number | string | Array } value + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + radius(value: number | string | Array): RectAttribute; } /** @@ -834,3 +884,32 @@ declare const RectInStance: RectAttribute; * @since 11 */ declare const RectInstance: RectAttribute; + +/** + * Provides an interface for drawing rectangles. + * + * @interface RectInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface RectInterface { + /** + * Called when a rectangle is created. + * + * @param { RectOptions | RoundedRectOptions } [options] - Rect options + * @returns { RectAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + ( + options?: RectOptions | RoundedRectOptions, + ): RectAttribute; +} \ No newline at end of file diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 11e2b9e59ad997bc279caeed16b8779d9cc8272f..dd06bb21317d7c0c8ae89516263c32d88d3a7a0c 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Callback, Optional, CommonMethod } from './common' +import { CustomBuilder } from './builder' +import { ResourceStr } from './units' +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * The refresh status of the drop-down refresh. * @@ -40,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RefreshStatus { /** @@ -62,7 +70,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Inactive, @@ -85,7 +94,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Drag, @@ -108,7 +118,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OverDrag, @@ -131,7 +142,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Refresh, @@ -154,7 +166,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Done, } @@ -181,7 +194,8 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RefreshOptions { /** @@ -266,7 +280,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ promptText?: ResourceStr; @@ -285,7 +300,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ builder?: CustomBuilder; @@ -296,7 +312,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ refreshingContent?: ComponentContent; } @@ -323,7 +340,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RefreshInterface { /** @@ -351,7 +369,8 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: RefreshOptions): RefreshAttribute; } @@ -378,7 +397,8 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RefreshAttribute extends CommonMethod { /** @@ -406,7 +426,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute; @@ -435,7 +456,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onRefreshing(callback: () => void): RefreshAttribute; @@ -447,7 +469,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ refreshOffset(value: number): RefreshAttribute; @@ -459,7 +482,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pullToRefresh(value: boolean): RefreshAttribute; @@ -472,7 +496,8 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onOffsetChange(callback: Callback): RefreshAttribute; @@ -484,14 +509,16 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pullDownRatio(ratio: Optional): RefreshAttribute; /** * The max pull down distance for Refresh. * - * @param { Optional } distance - The max pull down distance for Refresh, default value is { undefined }. + * @param { Optional } distance - The max pull down distance for Refresh, + * value range is [0, +∞), default value is { undefined }. * @returns { RefreshAttribute } The attribute of the Refresh. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform diff --git a/api/@internal/component/ets/relative_container.d.ts b/api/@internal/component/ets/relative_container.d.ts index cd67f313f5e676b8592ebd42beae25bc6c1555b5..5a6d60f4df9256bcd5546c8d4c0f8513ee827648 100644 --- a/api/@internal/component/ets/relative_container.d.ts +++ b/api/@internal/component/ets/relative_container.d.ts @@ -18,8 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Dimension } from './units'; +import { Axis } from './enums'; +import { CommonMethod } from './common'; +/*** endif */ + /** - * Provides ports for relative containers. + * Provides ports for relativeContainer. * * @interface RelativeContainerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -27,7 +33,7 @@ * @since 9 */ /** - * Provides ports for relative containers. + * Provides ports for relativeContainer. * * @interface RelativeContainerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -36,18 +42,19 @@ * @since 10 */ /** - * Provides ports for relative containers. + * Provides ports for relativeContainer. * * @interface RelativeContainerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RelativeContainerInterface { /** - * Constructor. + * Defines the constructor of RelativeContainer. * * @returns { RelativeContainerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -55,7 +62,7 @@ interface RelativeContainerInterface { * @since 9 */ /** - * Constructor. + * Defines the constructor of RelativeContainer. * * @returns { RelativeContainerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -64,14 +71,15 @@ interface RelativeContainerInterface { * @since 10 */ /** - * Constructor. + * Defines the constructor of RelativeContainer. * * @returns { RelativeContainerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): RelativeContainerAttribute; } @@ -83,7 +91,8 @@ interface RelativeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GuideLinePosition { /** @@ -93,7 +102,8 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start? : Dimension; @@ -104,51 +114,56 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end? : Dimension; } /** - * Specifies the GuideLineStyle of relative container + * Specifies the GuideLineStyle of relativeContainer * * @interface GuideLineStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GuideLineStyle { /** * Specifies the id of guideLine * - * @type {string} + * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; /** * Specifies the direction of guideLine * - * @type {Axis} + * @type { Axis } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction : Axis; /** * Specifies the position of guideLine * - * @type {GuideLinePosition} + * @type { GuideLinePosition } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position : GuideLinePosition; } @@ -156,11 +171,12 @@ declare interface GuideLineStyle { /** * Specifies the direction value of Barrier. * - * @enum {number} + * @enum { number } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarrierDirection { /** @@ -169,7 +185,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT, @@ -179,7 +196,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT, @@ -189,7 +207,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP, @@ -199,7 +218,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM, } @@ -211,7 +231,8 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LocalizedBarrierDirection { /** @@ -220,7 +241,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -230,7 +252,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 1, @@ -240,7 +263,8 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 2, @@ -250,63 +274,69 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 3, } /** - * Specifies the BarrierStyle of relative container + * Specifies the BarrierStyle of relativeContainer * * @interface BarrierStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BarrierStyle { /** * Specifies the id of barrier * - * @type {string} + * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; /** * Specifies the direction of barrier * - * @type {BarrierDirection} + * @type { BarrierDirection } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction : BarrierDirection; /** * Specifies the referencedId of barrier * - * @type {Array} + * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ referencedId : Array; } /** - * Specifies the Localized BarrierStyle of relative container + * Specifies the Localized BarrierStyle of relativeContainer * * @interface LocalizedBarrierStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedBarrierStyle { /** @@ -316,7 +346,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id : string; @@ -327,7 +358,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ localizedDirection : LocalizedBarrierDirection; @@ -338,7 +370,8 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ referencedId : Array; } @@ -362,7 +395,8 @@ declare interface LocalizedBarrierStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RelativeContainerAttribute extends CommonMethod { /** @@ -373,7 +407,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -385,7 +420,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -397,7 +433,8 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; } diff --git a/api/@internal/component/ets/remote_window.d.ts b/api/@internal/component/ets/remote_window.d.ts index 97f7b030b67026f700320961466df2ee9a6971d5..e0daccbb03c60e893cb8015f501a1a5304afc45b 100644 --- a/api/@internal/component/ets/remote_window.d.ts +++ b/api/@internal/component/ets/remote_window.d.ts @@ -17,21 +17,25 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ /** * Round rect. * * @interface RRect * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface RRect { /** * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ left: number; @@ -39,7 +43,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -47,7 +52,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -55,7 +61,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; @@ -63,7 +70,8 @@ interface RRect { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ radius: number; } @@ -74,7 +82,8 @@ interface RRect { * @interface WindowAnimationTarget * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface WindowAnimationTarget { /** @@ -82,7 +91,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -91,7 +101,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -100,7 +111,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly windowBounds: RRect; @@ -109,7 +121,8 @@ interface WindowAnimationTarget { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly missionId: number; } @@ -120,7 +133,8 @@ interface WindowAnimationTarget { * @interface RemoteWindowInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface RemoteWindowInterface { /** @@ -130,7 +144,8 @@ interface RemoteWindowInterface { * @returns { RemoteWindowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ (target: WindowAnimationTarget): RemoteWindowAttribute; } @@ -141,7 +156,8 @@ interface RemoteWindowInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RemoteWindowAttribute extends CommonMethod {} diff --git a/api/@internal/component/ets/rich_editor.d.ts b/api/@internal/component/ets/rich_editor.d.ts index b83d6aa2ffcc5c1f4fb4aa957ecba28ca4c52b83..db569b6f6cadcdc269c464340214e3f4bbd6ce37 100644 --- a/api/@internal/component/ets/rich_editor.d.ts +++ b/api/@internal/component/ets/rich_editor.d.ts @@ -18,6 +18,21 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font } from './units'; +import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums'; +import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString'; +import { Resource } from './../../../api/global/resource'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon'; +import { GestureEvent } from './gesture'; +import { EnterKeyType, SubmitEvent } from './textInput'; +import { LengthMetrics , ColorMetrics } from '../Graphics'; +import { TextBackgroundStyle } from "./span"; +/*** endif */ + /** * Defines delete text direction. * @@ -32,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RichEditorDeleteDirection { /** @@ -47,7 +63,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BACKWARD, @@ -63,7 +80,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD, } @@ -82,7 +100,8 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RichEditorSpanType { /** @@ -97,7 +116,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 0, @@ -113,7 +133,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -129,7 +150,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MIXED = 2, @@ -139,7 +161,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUILDER = 3, @@ -149,7 +172,8 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 4, } @@ -200,7 +224,8 @@ declare enum UndoStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RichEditorResponseType { /** @@ -216,7 +241,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT_CLICK = 0, @@ -233,7 +259,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1, @@ -250,7 +277,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 2, @@ -260,7 +288,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -279,7 +308,8 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSpanPosition { /** @@ -296,7 +326,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanIndex: number; @@ -314,7 +345,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanRange: [number, number]; } @@ -333,7 +365,8 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextStyle { /** @@ -350,7 +383,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -368,7 +402,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length | number; @@ -386,7 +421,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -404,7 +440,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -422,7 +459,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: ResourceStr; @@ -449,7 +487,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration?: DecorationStyleInterface; @@ -468,7 +507,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow?: ShadowOptions | Array; @@ -479,7 +519,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number | string; @@ -490,7 +531,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight?: number | string | Resource; @@ -501,7 +543,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -517,7 +560,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature?: string; @@ -528,7 +572,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -549,7 +594,8 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LeadingMarginPlaceholder { /** @@ -567,7 +613,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap: PixelMap; @@ -586,7 +633,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: [Dimension, Dimension]; } @@ -606,7 +654,8 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphStyle { /** @@ -624,7 +673,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign?: TextAlign; @@ -654,7 +704,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leadingMargin?: Dimension | LeadingMarginPlaceholder; @@ -665,7 +716,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -676,7 +728,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy?: LineBreakStrategy; @@ -687,7 +740,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphSpacing?: number; } @@ -699,7 +753,8 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PasteEvent { /** @@ -718,7 +773,8 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -737,7 +793,8 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpan { /** @@ -754,7 +811,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -772,7 +830,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -790,7 +849,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: RichEditorTextStyle; } @@ -810,7 +870,8 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichEditorLayoutStyle { /** @@ -828,7 +889,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension | Margin; @@ -847,7 +909,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Dimension | BorderRadiuses; } @@ -866,7 +929,8 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanStyle { /** @@ -883,7 +947,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: [Dimension, Dimension]; @@ -901,7 +966,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -919,7 +985,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -938,7 +1005,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: RichEditorLayoutStyle; } @@ -958,7 +1026,8 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanStyle { /** @@ -976,7 +1045,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: number | string | Resource; @@ -995,7 +1065,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: Array; @@ -1014,7 +1085,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -1033,7 +1105,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ effectStrategy?: SymbolEffectStrategy; @@ -1052,7 +1125,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingStrategy?: SymbolRenderingStrategy; } @@ -1071,7 +1145,8 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextStyleResult { /** @@ -1088,7 +1163,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor: ResourceColor; @@ -1106,7 +1182,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number; @@ -1124,7 +1201,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle: FontStyle; @@ -1142,7 +1220,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight: number; @@ -1160,7 +1239,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily: string; @@ -1187,7 +1267,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration: DecorationStyleResult; @@ -1198,7 +1279,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow?: Array; @@ -1209,7 +1291,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number; @@ -1220,7 +1303,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight?: number; @@ -1231,7 +1315,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -1247,7 +1332,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature?: string; @@ -1258,7 +1344,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -1278,7 +1365,8 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphResult { /** @@ -1296,7 +1384,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style: RichEditorParagraphStyle; @@ -1315,7 +1404,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ range: [number, number]; } @@ -1335,7 +1425,8 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanStyleResult { /** @@ -1353,7 +1444,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number | string | Resource; @@ -1372,7 +1464,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor: Array; @@ -1391,7 +1484,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight: number | FontWeight | string; @@ -1410,7 +1504,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ effectStrategy: SymbolEffectStrategy; @@ -1429,7 +1524,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ renderingStrategy: SymbolRenderingStrategy; } @@ -1448,7 +1544,8 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpanResult { /** @@ -1465,7 +1562,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1483,7 +1581,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -1501,7 +1600,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle: RichEditorTextStyleResult; @@ -1519,7 +1619,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetInSpan: [number, number]; @@ -1538,7 +1639,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolSpanStyle?: RichEditorSymbolSpanStyle; @@ -1557,7 +1659,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ valueResource?: Resource; @@ -1568,7 +1671,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphStyle?: RichEditorParagraphStyle; @@ -1579,7 +1683,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: string; @@ -1590,7 +1695,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -1609,7 +1715,8 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanStyleResult { /** @@ -1626,7 +1733,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size: [number, number]; @@ -1644,7 +1752,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign: ImageSpanAlignment; @@ -1662,7 +1771,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit: ImageFit; @@ -1673,7 +1783,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1692,7 +1803,8 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanResult { /** @@ -1709,7 +1821,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1727,7 +1840,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valuePixelMap?: PixelMap; @@ -1745,7 +1859,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ valueResourceStr?: ResourceStr; @@ -1763,7 +1878,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle: RichEditorImageSpanStyleResult; @@ -1781,7 +1897,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offsetInSpan: [number, number]; } @@ -1800,7 +1917,8 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpan { /** @@ -1817,7 +1935,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spanPosition: RichEditorSpanPosition; @@ -1835,7 +1954,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: PixelMap | ResourceStr; @@ -1853,7 +1973,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle?: RichEditorImageSpanStyle; } @@ -1872,7 +1993,8 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorRange { /** @@ -1891,7 +2013,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -1911,7 +2034,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number; } @@ -1931,7 +2055,8 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorGesture { /** @@ -1949,7 +2074,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick?: Callback; @@ -1968,7 +2094,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -1977,9 +2104,9 @@ declare interface RichEditorGesture { * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDoubleClick?: Callback; } @@ -1998,7 +2125,8 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorTextSpanOptions { /** @@ -2015,7 +2143,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2033,7 +2162,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: RichEditorTextStyle; @@ -2052,7 +2182,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphStyle?: RichEditorParagraphStyle; @@ -2071,7 +2202,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gesture?: RichEditorGesture; @@ -2082,7 +2214,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -2094,7 +2227,8 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface KeyboardOptions { /** @@ -2104,7 +2238,8 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ supportAvoidance?: boolean; } @@ -2123,7 +2258,8 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorImageSpanOptions { /** @@ -2140,7 +2276,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2158,7 +2295,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle?: RichEditorImageSpanStyle; @@ -2177,7 +2315,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gesture?: RichEditorGesture; @@ -2188,7 +2327,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onHover?: OnHoverCallback; } @@ -2208,7 +2348,8 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorBuilderSpanOptions { /** @@ -2226,7 +2367,8 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2236,7 +2378,8 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?ColorMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ dragBackgroundColor? : ColorMetrics; @@ -2246,7 +2389,8 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isDragShadowNeeded?: boolean; } @@ -2258,7 +2402,8 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PlaceholderStyle { /** @@ -2268,7 +2413,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ font?: Font; @@ -2279,7 +2425,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; } @@ -2300,7 +2447,8 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } @@ -2321,7 +2469,8 @@ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { /** @@ -2339,7 +2488,8 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style: RichEditorParagraphStyle; } @@ -2360,7 +2510,8 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2377,7 +2528,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle: RichEditorTextStyle; @@ -2388,7 +2540,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ urlStyle?: RichEditorUrlStyle; } @@ -2409,7 +2562,8 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2426,7 +2580,8 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ imageStyle: RichEditorImageSpanStyle; } @@ -2448,7 +2603,8 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2466,7 +2622,8 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolStyle: RichEditorSymbolSpanStyle; } @@ -2486,7 +2643,8 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSymbolSpanOptions { /** @@ -2504,7 +2662,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: number; @@ -2523,7 +2682,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: RichEditorSymbolSpanStyle; } @@ -2542,7 +2702,8 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorSelection { /** @@ -2559,7 +2720,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selection: [number, number]; @@ -2577,7 +2739,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spans: Array; } @@ -2596,7 +2759,8 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorInsertValue { /** @@ -2613,7 +2777,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ insertOffset: number; @@ -2631,7 +2796,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ insertValue: string; @@ -2642,7 +2808,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: string; } @@ -2661,7 +2828,8 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorDeleteValue { /** @@ -2678,7 +2846,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -2696,7 +2865,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction: RichEditorDeleteDirection; @@ -2714,7 +2884,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ length: number; @@ -2732,7 +2903,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ richEditorDeleteSpans: Array; } @@ -2744,7 +2916,8 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorChangeValue { /** @@ -2754,7 +2927,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rangeBefore: TextRange; @@ -2765,7 +2939,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedSpans: Array; @@ -2776,7 +2951,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedImageSpans: Array; @@ -2787,7 +2963,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacedSymbolSpans: Array; @@ -2797,7 +2974,6 @@ declare interface RichEditorChangeValue { * @type { ?TextChangeReason } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @atomicservice * @since 20 */ changeReason?: TextChangeReason; @@ -2817,7 +2993,8 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorOptions { /** @@ -2834,7 +3011,8 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller: RichEditorController; } @@ -2846,7 +3024,8 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorStyledStringOptions { /** @@ -2856,7 +3035,8 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controller: RichEditorStyledStringController; } @@ -2876,7 +3056,8 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionMenuOptions { /** @@ -2903,7 +3084,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: MenuOnAppearCallback; @@ -2931,7 +3113,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: Callback; @@ -2942,7 +3125,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ menuType?: MenuType; @@ -2953,7 +3137,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onMenuShow?: MenuCallback; @@ -2964,7 +3149,8 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onMenuHide?: MenuCallback; @@ -2974,7 +3160,8 @@ declare interface SelectionMenuOptions { * @type { ?PreviewMenuOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ previewMenuOptions?: PreviewMenuOptions; } @@ -2985,7 +3172,8 @@ declare interface SelectionMenuOptions { * @interface PreviewMenuOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewMenuOptions { /** @@ -2994,7 +3182,8 @@ declare interface PreviewMenuOptions { * @type { ?HapticFeedbackMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hapticFeedbackMode? : HapticFeedbackMode; } @@ -3006,7 +3195,8 @@ declare interface PreviewMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorBaseController implements TextEditControllerEx { /** @@ -3023,7 +3213,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset(): number; @@ -3043,7 +3234,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setCaretOffset(offset: number): boolean; @@ -3059,7 +3251,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -3078,7 +3271,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTypingStyle(): RichEditorTextStyle; @@ -3097,7 +3291,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTypingStyle(value: RichEditorTextStyle): void; @@ -3130,7 +3325,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -3141,7 +3337,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEditing(): boolean; @@ -3151,7 +3348,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; @@ -3162,7 +3360,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; @@ -3173,7 +3372,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewText(): PreviewText; @@ -3184,7 +3384,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretRect(): RectResult | undefined; } @@ -3210,7 +3411,8 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorController extends RichEditorBaseController { /** @@ -3233,7 +3435,7 @@ declare class RichEditorController extends RichEditorBaseController { * @atomicservice * @since 11 */ - /** + /** * Add a text span. * * @param { ResourceStr } content - text value. @@ -3243,6 +3445,7 @@ declare class RichEditorController extends RichEditorBaseController { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number; @@ -3264,7 +3467,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number; @@ -3287,7 +3491,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number; @@ -3310,7 +3515,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number; @@ -3328,7 +3534,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void; @@ -3347,7 +3554,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ updateParagraphStyle(value: RichEditorParagraphStyleOptions): void; @@ -3365,7 +3573,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ deleteSpans(value?: RichEditorRange): void; @@ -3385,7 +3594,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSpans(value?: RichEditorRange): Array; @@ -3406,7 +3616,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getParagraphs(value?: RichEditorRange): Array; @@ -3425,7 +3636,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): RichEditorSelection; @@ -3439,7 +3651,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fromStyledString(value: StyledString): Array; @@ -3453,7 +3666,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ toStyledString(value: RichEditorRange): StyledString; } @@ -3465,7 +3679,8 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult; @@ -3477,7 +3692,8 @@ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController { /** @@ -3487,7 +3703,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(styledString: StyledString): void; @@ -3507,6 +3724,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; @@ -3517,7 +3735,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSelection(): RichEditorRange; @@ -3528,7 +3747,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onContentChanged(listener: StyledStringChangedListener): void; } @@ -3547,7 +3767,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichEditorAttribute extends CommonMethod { /** @@ -3576,7 +3797,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onReady(callback: Callback): RichEditorAttribute; @@ -3606,7 +3828,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(callback: Callback): RichEditorAttribute; @@ -3618,7 +3841,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSelectionChange(callback: Callback): RichEditorAttribute; @@ -3648,7 +3872,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToIMEInput(callback: Callback): RichEditorAttribute; @@ -3678,7 +3903,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onIMEInputComplete(callback: Callback): RichEditorAttribute; @@ -3690,7 +3916,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidIMEInput(callback: Callback): RichEditorAttribute; @@ -3720,7 +3947,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ aboutToDelete(callback: Callback): RichEditorAttribute; @@ -3750,7 +3978,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDeleteComplete(callback: Callback): RichEditorAttribute; @@ -3771,7 +4000,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOptions(value: CopyOptions): RichEditorAttribute; @@ -3798,7 +4028,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType, options?: SelectionMenuOptions): RichEditorAttribute; @@ -3830,7 +4061,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute; @@ -3851,7 +4083,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: PasteEventCallback): RichEditorAttribute; @@ -3872,7 +4105,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableDataDetector(enable: boolean): RichEditorAttribute; @@ -3884,7 +4118,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): RichEditorAttribute; @@ -3905,7 +4140,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute; @@ -3918,7 +4154,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute; @@ -3930,7 +4167,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): RichEditorAttribute; @@ -3942,7 +4180,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): RichEditorAttribute; @@ -3954,7 +4193,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onEditingChange(callback: Callback): RichEditorAttribute; @@ -3966,7 +4206,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): RichEditorAttribute; @@ -3978,7 +4219,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSubmit(callback: SubmitCallback): RichEditorAttribute; @@ -3990,7 +4232,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback) : RichEditorAttribute; @@ -4002,7 +4245,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute; @@ -4014,7 +4258,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): RichEditorAttribute; @@ -4026,7 +4271,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): RichEditorAttribute; @@ -4038,7 +4284,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute; @@ -4050,7 +4297,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute; @@ -4062,7 +4310,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): RichEditorAttribute; @@ -4074,7 +4323,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ barState(state: BarState): RichEditorAttribute; @@ -4086,7 +4336,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(maxLength: Optional): RichEditorAttribute; @@ -4098,7 +4349,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(maxLines: Optional): RichEditorAttribute; @@ -4121,7 +4373,8 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): RichEditorAttribute; @@ -4132,7 +4385,8 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): RichEditorAttribute; @@ -4147,6 +4401,18 @@ declare class RichEditorAttribute extends CommonMethod { * @since 20 */ undoStyle(style: Optional): RichEditorAttribute; + + /** + * Set scrollbar color of rich editor. + * + * @param { Optional } color - Color of the rich editor scrollbar. + * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + scrollBarColor(color: Optional): RichEditorAttribute; } /** @@ -4155,7 +4421,8 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CutEvent { /** @@ -4165,7 +4432,8 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -4176,7 +4444,8 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CopyEvent { /** @@ -4186,7 +4455,8 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preventDefault?: Callback; } @@ -4197,7 +4467,8 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RichEditorUrlStyle { /** @@ -4207,7 +4478,8 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ url?: ResourceStr; } @@ -4221,7 +4493,8 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -4234,7 +4507,8 @@ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => vo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type MenuOnAppearCallback = (start: number, end: number) => void; @@ -4247,7 +4521,8 @@ declare type MenuOnAppearCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type MenuCallback = (start: number, end: number) => void; @@ -4259,7 +4534,8 @@ declare type MenuCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type PasteEventCallback = (event?: PasteEvent) => void; @@ -4272,7 +4548,8 @@ declare type PasteEventCallback = (event?: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; @@ -4290,7 +4567,8 @@ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichEditorInterface { /** @@ -4309,7 +4587,8 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: RichEditorOptions): RichEditorAttribute; @@ -4321,7 +4600,8 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (options: RichEditorStyledStringOptions): RichEditorAttribute; } diff --git a/api/@internal/component/ets/rich_text.d.ts b/api/@internal/component/ets/rich_text.d.ts index 2f0984f0502bbd2f849adde94e98e24ed6551ac8..e11c5718fd7ceb4f87694e9e94fa8302579228d6 100644 --- a/api/@internal/component/ets/rich_text.d.ts +++ b/api/@internal/component/ets/rich_text.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ + /** * Provides an interface for RichText component. * @@ -40,7 +44,8 @@ * @interface RichTextInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RichTextInterface { /** @@ -73,13 +78,25 @@ interface RichTextInterface { /** * Set value. * - * @param { string | Resource } content + * @param { string | Resource} content * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 20 */ (content: string | Resource): RichTextAttribute; + + /** + * Set value. + * + * @param { string } content + * @returns { RichTextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + (content: string): RichTextAttribute; } /** @@ -104,7 +121,8 @@ interface RichTextInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RichTextAttribute extends CommonMethod { /** @@ -132,7 +150,8 @@ declare class RichTextAttribute extends CommonMethod { * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(callback: () => void): RichTextAttribute; @@ -161,7 +180,8 @@ declare class RichTextAttribute extends CommonMethod { * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onComplete(callback: () => void): RichTextAttribute; } diff --git a/api/@internal/component/ets/root_scene.d.ts b/api/@internal/component/ets/root_scene.d.ts index 503451a4751dd3ed000bce86b98819e43dfcc3aa..9d06f6b9740f03851dc23a96aeeacb6f7c7f6f80 100644 --- a/api/@internal/component/ets/root_scene.d.ts +++ b/api/@internal/component/ets/root_scene.d.ts @@ -17,14 +17,17 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ /** * Defines the session of RootScene. * * @interface RootSceneSession * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface RootSceneSession { } @@ -35,7 +38,8 @@ interface RootSceneSession { * @interface RootSceneInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface RootSceneInterface { /** @@ -45,7 +49,8 @@ interface RootSceneInterface { * @returns { RootSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (session: RootSceneSession): RootSceneAttribute; } @@ -56,7 +61,8 @@ interface RootSceneInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RootSceneAttribute extends CommonMethod { } diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts index 36d502a1feb9129f65a79c70a37b64d30d47b1cb..b90b7343684fea0ba14dc7720e66ecfecb2b7b1e 100644 --- a/api/@internal/component/ets/row.d.ts +++ b/api/@internal/component/ets/row.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { PointLightStyle, Optional, CommonMethod } from './common'; +import { VerticalAlign, FlexAlign } from './enums'; +import { SpaceType } from './column'; +/*** endif */ + + /** * Define options used to construct a row. * @@ -26,7 +33,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RowOptions { /** @@ -72,7 +80,8 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space?: string | number; } @@ -85,7 +94,8 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowOptionsV2 { /** @@ -96,7 +106,8 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space?: SpaceType; } @@ -133,7 +144,8 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowInterface { /** @@ -178,26 +190,28 @@ interface RowInterface { * Called when the layout is set in the horizontal direction. * * Anonymous Object Rectification - * @param { ?RowOptions } options - row options + * @param { ?RowOptions } [options] - row options * @returns { RowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RowOptions): RowAttribute; /** * Called when the layout is set in the horizontal direction. * * Anonymous Object Rectification - * @param { ?(RowOptions | RowOptionsV2) } options - row options + * @param { ?(RowOptions | RowOptionsV2) } [options] - row options * @returns { RowAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: RowOptions | RowOptionsV2): RowAttribute; } @@ -234,7 +248,8 @@ interface RowInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RowAttribute extends CommonMethod { /** @@ -273,7 +288,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignItems(value: VerticalAlign): RowAttribute; @@ -313,7 +329,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ justifyContent(value: FlexAlign): RowAttribute; /** @@ -323,7 +340,8 @@ declare class RowAttribute extends CommonMethod { * @returns { RowAttribute } The attribute of the row. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): RowAttribute; /** @@ -335,7 +353,8 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reverse(isReversed: Optional): RowAttribute; } diff --git a/api/@internal/component/ets/row_split.d.ts b/api/@internal/component/ets/row_split.d.ts index 936f5c47b8492df8935a174740a702e895cd2a10..395b1e5e0a2cd92953b1690dff8175fbac7153f4 100644 --- a/api/@internal/component/ets/row_split.d.ts +++ b/api/@internal/component/ets/row_split.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +/*** endif */ + + /** * Provides interfaces for layout in the vertical direction. * @@ -40,7 +45,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface RowSplitInterface { /** @@ -65,7 +71,8 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): RowSplitAttribute; } @@ -86,7 +93,8 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class RowSplitAttribute extends CommonMethod { /** @@ -114,7 +122,8 @@ declare class RowSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resizeable(value: boolean): RowSplitAttribute; } diff --git a/api/@internal/component/ets/save_button.d.ts b/api/@internal/component/ets/save_button.d.ts index c1f1563e882f2b62e467576c235d28714c861e5a..5841ca3dd1699332e10a2eb963f67fae51b34a2a 100644 --- a/api/@internal/component/ets/save_button.d.ts +++ b/api/@internal/component/ets/save_button.d.ts @@ -543,17 +543,6 @@ declare class SaveButtonAttribute extends SecurityComponentMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScreenAttribute extends CommonMethod { } diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts index 51bc0c23d48bbb46be566432a8f2f10121177fa4..42bfadfe7b550cac1ee82d82289ff80f15c86770 100644 --- a/api/@internal/component/ets/scroll.d.ts +++ b/api/@internal/component/ets/scroll.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { BarState, Edge, Color, EdgeEffect, ScrollSource ,Curve} from './enums' +import { ICurve, RectResult, ScrollableCommonMethod, EdgeEffectOptions, NestedScrollOptions,CommonMethod } from './common' +import { Dimension, Length, VoidCallback, Resource, LengthMetrics } from './units' +import { ScrollSnapAlign, ScrollState } from './list' +/*** endif */ + /** * Content scroll direction. * @@ -40,7 +47,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollDirection { /** @@ -62,7 +70,8 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -85,7 +94,8 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, @@ -117,9 +127,20 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, + + /** + * Free scrolling is supported. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + FREE = 4, } /** @@ -137,7 +158,8 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollAlign { /** @@ -153,7 +175,8 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, @@ -170,7 +193,8 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER, @@ -187,7 +211,8 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END, @@ -204,7 +229,8 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO, } @@ -216,7 +242,8 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OffsetResult { /** @@ -226,7 +253,8 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ xOffset: number; @@ -237,7 +265,8 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ yOffset: number; } @@ -249,7 +278,8 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollEdgeOptions { /** @@ -261,7 +291,8 @@ declare interface ScrollEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocity?: number; } @@ -273,7 +304,8 @@ declare interface ScrollEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollToIndexOptions { /** @@ -283,7 +315,8 @@ declare interface ScrollToIndexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ extraOffset?: LengthMetrics; } @@ -295,7 +328,8 @@ declare interface ScrollToIndexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollAnimationOptions { /** @@ -310,7 +344,8 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; @@ -322,7 +357,8 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | ICurve; @@ -339,7 +375,8 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ canOverScroll?: boolean; } @@ -351,7 +388,8 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OffsetOptions { /** @@ -362,7 +400,8 @@ declare interface OffsetOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ xOffset?: Dimension; @@ -374,7 +413,8 @@ declare interface OffsetOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ yOffset?: Dimension; } @@ -444,7 +484,8 @@ declare interface UIScrollEvent extends UIScrollableCommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Scroller { /** @@ -466,7 +507,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -506,6 +548,18 @@ declare class Scroller { */ scrollTo(options: ScrollOptions); + /** + * Called when the setting slides to the specified position. + * + * @param { ScrollOptions } options - scroll options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scrollTo(options: ScrollOptions): void; + /** * Called when scrolling to the edge of the container. * @@ -543,6 +597,20 @@ declare class Scroller { * @since 12 */ scrollEdge(value: Edge, options?: ScrollEdgeOptions); + + /** + * Called when scrolling to the edge of the container. + * + * @param { Edge } value - Edge type of the container. + * @param { ScrollEdgeOptions } [options] - Options of scrolling to edge. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scrollEdge(value: Edge, options?: ScrollEdgeOptions): void; + /** * Performs inertial scrolling based on the initial velocity passed in. @@ -559,7 +627,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fling(velocity: number): void; @@ -597,6 +666,18 @@ declare class Scroller { * @since 14 */ scrollPage(value: ScrollPageOptions); + + /** + * Called when page turning mode is set. + * + * @param { ScrollPageOptions } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scrollPage(value: ScrollPageOptions): void; /** * Scrolls to the next or previous page. @@ -630,7 +711,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ currentOffset() : OffsetResult; @@ -683,7 +765,8 @@ declare class Scroller { *
Default value when the container is WaterFlow: ScrollAlign.START *
NOTE *
This parameter is only available for the List, Grid, and WaterFlow components. - * @param { ScrollToIndexOptions } [options] - Options for scrolling to a specified index, for example, an extra offset for the scroll.
Default value: 0, in vp + * @param { ScrollToIndexOptions } [options] - Options for scrolling to a specified index, + * for example, an extra offset for the scroll.
Default value: 0, in vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -691,6 +774,21 @@ declare class Scroller { */ scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions); + /** + * Scroll to the specified index. + * + * @param { number } value - Index to jump to. + * @param { boolean } [smooth] - If true, scroll to index item with animation. If false, scroll to index item without animation. + * @param { ScrollAlign } [align] - Sets the alignment mode of a specified index. + * @param { ScrollToIndexOptions } [options] - Sets the options of a specified index, such as extra offset. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions): void; + /** * Called when the setting slides by offset. * @@ -716,7 +814,9 @@ declare class Scroller { *

* * @param { Length } dx - Amount to scroll by in the horizontal direction. The percentage format is not supported. + *
Value range: (-∞, +∞). * @param { Length } dy - Amount to scroll by in the vertical direction. The percentage format is not supported. + *
Value range: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -724,6 +824,19 @@ declare class Scroller { */ scrollBy(dx: Length, dy: Length); + /** + * Called when the setting slides by offset. + * + * @param { Length } dx + * @param { Length } dy + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + scrollBy(dx: Length, dy: Length): void; + /** * Indicates whether the component scrolls to the end position. * @@ -743,7 +856,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isAtEnd(): boolean; @@ -781,7 +895,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getItemRect(index: number): RectResult; @@ -803,7 +918,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getItemIndex(x: number, y: number): number; } @@ -815,7 +931,8 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollOptions { /** @@ -851,7 +968,8 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ xOffset: number | string; @@ -888,7 +1006,8 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ yOffset: number | string; @@ -935,7 +1054,8 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ animation?: ScrollAnimationOptions | boolean; @@ -943,6 +1063,7 @@ declare interface ScrollOptions { * Set whether the scroll target position can over the boundary. * * @type { ?boolean } whether the scroll target position can over the boundary. + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -957,7 +1078,8 @@ declare interface ScrollOptions { * @interface ScrollPageOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollPageOptions { /** @@ -968,7 +1090,8 @@ declare interface ScrollPageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ next: boolean; @@ -981,7 +1104,8 @@ declare interface ScrollPageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ animation?: boolean; } @@ -999,7 +1123,8 @@ declare interface ScrollPageOptions { * @interface ScrollSnapOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollSnapOptions { /** @@ -1016,7 +1141,8 @@ declare interface ScrollSnapOptions { * @default ScrollSnapAlign.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ snapAlign: ScrollSnapAlign; @@ -1046,7 +1172,8 @@ declare interface ScrollSnapOptions { * @default 100% * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ snapPagination?: Dimension | Array; @@ -1071,7 +1198,8 @@ declare interface ScrollSnapOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableSnapToStart?: boolean; @@ -1096,7 +1224,8 @@ declare interface ScrollSnapOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableSnapToEnd?: boolean; } @@ -1123,7 +1252,8 @@ declare interface ScrollSnapOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScrollInterface { /** @@ -1151,7 +1281,8 @@ interface ScrollInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (scroller?: Scroller): ScrollAttribute; } @@ -1164,7 +1295,8 @@ interface ScrollInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollEdgeCallback = (side: Edge) => void; @@ -1175,7 +1307,8 @@ declare type OnScrollEdgeCallback = (side: Edge) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface OnScrollFrameBeginHandlerResult { /** @@ -1210,7 +1343,8 @@ interface OnScrollFrameBeginHandlerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ offsetRemain: number; } @@ -1225,7 +1359,8 @@ interface OnScrollFrameBeginHandlerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) => OnScrollFrameBeginHandlerResult; @@ -1251,7 +1386,8 @@ declare type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) = * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollAttribute extends ScrollableCommonMethod { /** @@ -1279,10 +1415,68 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollable(value: ScrollDirection): ScrollAttribute; + /** + * Set maximum zoom scale. + * + * @param { number } scale - Set maximum zoom scale. + *
Default value: 1. + *
Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + maxZoomScale(scale: number): ScrollAttribute; + + /** + * Set minimum zoom scale. + * + * @param { number } scale - Set minimum zoom scale. + *
Default value: 1. + *
Value range: (0, maxZoomScale]. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + minZoomScale(scale: number): ScrollAttribute; + + /** + * Current zoom scale. + * This parameter supports !! for two-way binding of variables. + * + * @param { number } scale - Current zoom scale. + *
Default value: 1. + *
Value range: (0, +∞). + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + zoomScale(scale: number): ScrollAttribute; + + /** + * Enable bounces zoom scale. + * This parameter supports !! for two-way binding of variables. + * + * @param { boolean } enable - Enable bounces zoom scale. + *
Default value: true. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + enableBouncesZoom(enable: boolean): ScrollAttribute; + /** * Called when the setting slides to the specified position. * @@ -1337,7 +1531,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillScroll(handler: ScrollOnWillScrollCallback): ScrollAttribute; @@ -1356,7 +1551,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidScroll(handler: ScrollOnScrollCallback): ScrollAttribute; @@ -1403,7 +1599,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollEdge(event: OnScrollEdgeCallback): ScrollAttribute; @@ -1448,7 +1645,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStart(event: VoidCallback): ScrollAttribute; @@ -1510,10 +1708,47 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop(event: VoidCallback): ScrollAttribute; + /** + * Called when the Scroll did zoom. + * + * @param { ScrollOnDidZoomCallback } event - callback of zoom. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onDidZoom(event: ScrollOnDidZoomCallback): ScrollAttribute; + + /** + * Called when zooming has stated. + * + * @param { VoidCallback } event - Zoom start callback. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onZoomStart(event: VoidCallback): ScrollAttribute; + + /** + * Called when zooming has stopped. + * + * @param { VoidCallback } event - Zoom stop callback. + * @returns { ScrollAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onZoomStop(event: VoidCallback): ScrollAttribute; + /** * Called when the status of the scroll bar is set. * @@ -1539,7 +1774,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBar(barState: BarState): ScrollAttribute; @@ -1563,12 +1799,13 @@ declare class ScrollAttribute extends ScrollableCommonMethod { /** * Sets the scrollbar color. * - * @param { Color | number | string } color - Scrollbar color.
Default value: '\#182431' (40% opacity) + * @param { Color | number | string } color - Scrollbar color.
Default value: '#66182431' * @returns { ScrollAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarColor(color: Color | number | string): ScrollAttribute; @@ -1597,7 +1834,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollBarWidth(value: number | string): ScrollAttribute; @@ -1630,7 +1868,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect(edgeEffect: EdgeEffect, options?: EdgeEffectOptions): ScrollAttribute; @@ -1670,7 +1909,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollFrameBegin(event: OnScrollFrameBeginCallback): ScrollAttribute; @@ -1692,7 +1932,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: NestedScrollOptions): ScrollAttribute; @@ -1714,7 +1955,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableScrollInteraction(value: boolean): ScrollAttribute; @@ -1740,7 +1982,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ friction(value: number | Resource): ScrollAttribute; @@ -1759,7 +2002,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @returns { ScrollAttribute } the attribute of the scroll. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollSnap(value: ScrollSnapOptions): ScrollAttribute; @@ -1775,13 +2019,14 @@ declare class ScrollAttribute extends ScrollableCommonMethod { /** * Sets whether to enable the swipe-to-turn-pages feature. * - * @param { boolean } value - Whether to enable the swipe-to-turn-pages feature. + * @param { boolean } value - Whether to enable the swipe-to-turn-pages feature. Default value: false. * The value true means to enable the swipe-to-turn-pages feature, and false means the opposite. * @returns { ScrollAttribute } the attribute of the scroll. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePaging(value: boolean): ScrollAttribute; @@ -1795,7 +2040,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ initialOffset(value: OffsetOptions): ScrollAttribute; } @@ -1820,7 +2066,8 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void; @@ -1846,6 +2093,37 @@ declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollS declare type ScrollOnWillScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | OffsetResult; +/** + * Called before scroll to allow developer to control real offset the Scroll can scroll. + * + * @typedef { function } ScrollOnWillScrollCallback + * @param { number } xOffset - horizontal offset this frame will scroll, which may or may not be reached. + * @param { number } yOffset - vertical offset this frame will scroll, which may or may not be reached. + * @param { ScrollState } scrollState - current scroll state. + * @param { ScrollSource } scrollSource - source of current scroll. + * @returns { undefined | OffsetResult } the remain offset for the Scroll, + * same as (xOffset, yOffset) when no OffsetResult is returned. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ScrollOnWillScrollCallback = +(xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | OffsetResult; + +/** + * callback of Scroll, using in onDidZoom. + * + * @typedef { function } ScrollOnDidZoomCallback + * @param { number } scale - current zoom scale. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare type ScrollOnDidZoomCallback = (scale: number) => void; + /** * Defines Scroll Component. * diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index 47db01d9f059443df8c860d123fb8cac851d7e4a..3dfc4cf07a7a1a060e01eb5872d9cce97e0a7736 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Scroller } from './scroll' +import { BarState } from './enums' +import { Optional, CommonMethod } from './common' +/*** endif */ + /** * Content scroll direction. * @@ -40,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ScrollBarDirection { /** @@ -62,7 +69,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Vertical, @@ -85,7 +93,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Horizontal, } @@ -112,7 +121,8 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScrollBarOptions { /** @@ -137,7 +147,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scroller: Scroller; @@ -163,7 +174,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction?: ScrollBarDirection; @@ -189,7 +201,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ state?: BarState; } @@ -216,7 +229,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScrollBarInterface { /** @@ -244,7 +258,8 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: ScrollBarOptions): ScrollBarAttribute; } @@ -271,7 +286,8 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollBarAttribute extends CommonMethod { /** @@ -281,7 +297,8 @@ declare class ScrollBarAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableNestedScroll(enabled: Optional): ScrollBarAttribute; diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index ba0de091712c43217f1166333edb8bc774e3f163..7ce15eae7e18c0e50cba817f21cf6610371e20d4 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -18,6 +18,18 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { TextContentControllerBase, SelectionOptions,Callback,CommonMethod,Optional,TextDecorationOptions, Bindable } from './common'; +import { CustomBuilder } from './builder'; +import { ResourceStr,Length,ResourceColor ,Dimension,Font} from './units'; +import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions,KeyboardAppearance,EditableTextChangeValue,AutoCapitalizationMode } from './textCommon'; +import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from './textInput'; +import { CopyOptions,TextAlign } from './enums'; +import { KeyboardOptions } from './richEditor'; +import { Resource } from '../../global/resource'; +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +/*** endif */ + /** * Provides the method of switching the cursor position. * @@ -40,7 +52,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SearchController extends TextContentControllerBase { /** @@ -63,7 +76,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -89,7 +103,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): void; @@ -106,7 +121,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; @@ -133,7 +149,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; } @@ -153,7 +170,8 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum CancelButtonStyle { /** @@ -169,7 +187,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CONSTANT, @@ -186,7 +205,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ INVISIBLE, @@ -203,7 +223,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ INPUT } @@ -223,7 +244,8 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SearchType { /** @@ -239,7 +261,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -256,7 +279,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER = 2, @@ -274,7 +298,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 3, @@ -292,7 +317,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 5, @@ -302,7 +328,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_DECIMAL = 12, @@ -312,7 +339,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ URL = 13, @@ -334,7 +362,8 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SearchOptions { /** @@ -367,7 +396,7 @@ declare interface SearchOptions { * @atomicservice * @since 18 */ - /** + /** * Text input in the search text box. * * @type { ?ResourceStr } @@ -377,6 +406,17 @@ declare interface SearchOptions { */ value?: ResourceStr; + /** + * Text input in the search text box. + * + * @type { ?string} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value?: string; + /** * Text displayed when there is no input. * @@ -406,7 +446,8 @@ declare interface SearchOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ResourceStr; @@ -443,7 +484,8 @@ declare interface SearchOptions { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string; @@ -469,7 +511,8 @@ declare interface SearchOptions { * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ controller?: SearchController; } @@ -496,7 +539,8 @@ declare interface SearchOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SearchInterface { /** @@ -535,7 +579,8 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ (options?: SearchOptions): SearchAttribute; } @@ -555,7 +600,8 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IconOptions { /** @@ -577,7 +623,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -596,7 +643,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -615,7 +663,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src?: ResourceStr; } @@ -635,7 +684,8 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SearchButtonOptions { /** @@ -657,7 +707,8 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: Length; @@ -676,7 +727,8 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -693,7 +745,8 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ autoDisable?: Boolean; } @@ -705,7 +758,8 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CancelButtonOptions { /** @@ -716,7 +770,8 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ style?: CancelButtonStyle; @@ -728,7 +783,8 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ icon?: IconOptions; } @@ -749,6 +805,7 @@ interface CancelButtonOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ interface CancelButtonSymbolOptions { /** @@ -758,7 +815,8 @@ interface CancelButtonSymbolOptions { * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ style?: CancelButtonStyle; @@ -780,6 +838,7 @@ interface CancelButtonSymbolOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ icon?: SymbolGlyphModifier; } @@ -793,7 +852,8 @@ interface CancelButtonSymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; @@ -819,7 +879,8 @@ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SearchAttribute extends CommonMethod { /** @@ -851,7 +912,8 @@ declare class SearchAttribute extends CommonMethod { * * * @param { string } value - indicates the text of the search button. - * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button.Default value is { fontSize: '16fp', fontColor: '#ff3f97e9' } + * @param { SearchButtonOptions } option - indicates the fontSize and fontColor of the search button. + * Default value is { fontSize: '16fp', fontColor: '#ff3f97e9' } * @returns { SearchAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -870,7 +932,19 @@ declare class SearchAttribute extends CommonMethod { * @since 20 */ searchButton(value: ResourceStr, option?: SearchButtonOptions): SearchAttribute; - + /** + * Set the search button text, fontSize and fontColor + * + * @param { string } value - indicates the text of the search button. + * @param { SearchButtonOptions } [option] - indicates the fontSize and fontColor of the search button. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + searchButton(value: string, option?: SearchButtonOptions): SearchAttribute; /** * Set the text Color * @@ -892,7 +966,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SearchAttribute; @@ -943,7 +1018,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; @@ -990,7 +1066,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; @@ -1002,7 +1079,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): SearchAttribute; @@ -1023,7 +1101,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: Callback): SearchAttribute; @@ -1036,7 +1115,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: Callback): SearchAttribute; @@ -1052,7 +1132,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): SearchAttribute; @@ -1084,7 +1165,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): SearchAttribute; @@ -1113,7 +1195,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): SearchAttribute; @@ -1147,7 +1230,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value?: Font): SearchAttribute; @@ -1181,7 +1265,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textFont(value?: Font): SearchAttribute; @@ -1193,7 +1278,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): SearchAttribute; @@ -1249,6 +1335,19 @@ declare class SearchAttribute extends CommonMethod { */ onSubmit(callback: SearchSubmitCallback): SearchAttribute; + /** + * Call the function when clicked the search button. + * + * @param { Callback | SearchSubmitCallback } callback - callback of the listened event. + * @returns { SearchAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onSubmit(callback: Callback | SearchSubmitCallback): SearchAttribute; + /** * Call the function when editing the input text * @@ -1289,7 +1388,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): SearchAttribute; @@ -1321,7 +1421,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; @@ -1353,7 +1454,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: OnContentScrollCallback): SearchAttribute; @@ -1393,7 +1495,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): SearchAttribute; @@ -1433,7 +1536,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): SearchAttribute; @@ -1476,7 +1580,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: OnPasteCallback): SearchAttribute; @@ -1511,7 +1616,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): SearchAttribute; @@ -1551,6 +1657,7 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxLength(value: number): SearchAttribute; @@ -1583,7 +1690,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): SearchAttribute; @@ -1608,7 +1716,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): SearchAttribute; @@ -1636,7 +1745,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): SearchAttribute; @@ -1654,7 +1764,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): SearchAttribute; @@ -1672,7 +1783,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): SearchAttribute; @@ -1710,6 +1822,7 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: Optional): SearchAttribute; @@ -1745,6 +1858,7 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): SearchAttribute; @@ -1789,7 +1903,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; @@ -1801,7 +1916,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): SearchAttribute; @@ -1820,7 +1936,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): SearchAttribute; @@ -1837,7 +1954,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): SearchAttribute; @@ -1858,7 +1976,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type(value: SearchType): SearchAttribute; @@ -1874,7 +1993,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): SearchAttribute; @@ -1892,7 +2012,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): SearchAttribute; @@ -1908,7 +2029,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): SearchAttribute; @@ -1926,7 +2048,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): SearchAttribute; @@ -1942,7 +2065,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): SearchAttribute; @@ -1968,7 +2092,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; @@ -1985,7 +2110,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): SearchAttribute; @@ -2009,7 +2135,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): SearchAttribute; @@ -2021,7 +2148,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): SearchAttribute; @@ -2033,7 +2161,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): SearchAttribute; @@ -2044,7 +2173,8 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): SearchAttribute; @@ -2061,7 +2191,8 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): SearchAttribute; @@ -2072,7 +2203,8 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): SearchAttribute; diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 41fcdac73f4f97b4797cc06b6e43362cdfc818b7..f1ea440717c5e18368636752f40946061ecf2cff 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -18,6 +18,16 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, CommonMethod, ContentModifier, Optional, BlurStyle, Bindable } from './common'; +import { ControlSize } from './button'; +import { DividerOptions } from './textPicker'; +import { ResourceStr, Dimension, EdgeOutlineWidths, ResourceColor, EdgeColors, Resource, Font, Length, Offset, DividerStyleOptions } from './units'; +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +import { TextModifier } from '../TextModifier'; +import { OptionWidthMode } from './enums'; +/*** endif */ + /** * The declare of selectOption. * @@ -40,7 +50,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectOption { /** @@ -65,7 +76,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: ResourceStr; @@ -91,7 +103,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -111,6 +124,7 @@ declare interface SelectOption { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; } @@ -137,7 +151,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SelectInterface { /** @@ -165,7 +180,8 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options: Array): SelectAttribute; } @@ -185,7 +201,8 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ArrowPosition { /** @@ -201,7 +218,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END = 0, @@ -218,7 +236,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START = 1 } @@ -237,7 +256,8 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuAlignType { /** @@ -252,7 +272,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ START, /** @@ -267,7 +288,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER, /** @@ -282,7 +304,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ END } @@ -293,7 +316,8 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AvoidanceMode { /** @@ -302,7 +326,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ COVER_TARGET, /** @@ -311,7 +336,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ AVOID_AROUND_TARGET } @@ -325,7 +351,8 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSelectCallback = (index: number, selectStr: string) => void; @@ -337,6 +364,7 @@ declare type OnSelectCallback = (index: number, selectStr: string) => void; * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface MenuOutlineOptions { /** @@ -347,6 +375,7 @@ declare interface MenuOutlineOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ width?: Dimension | EdgeOutlineWidths; @@ -358,6 +387,7 @@ declare interface MenuOutlineOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ color?: ResourceColor | EdgeColors; } @@ -384,7 +414,8 @@ declare interface MenuOutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SelectAttribute extends CommonMethod { /** @@ -412,7 +443,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected(value: number | Resource): SelectAttribute; @@ -424,7 +456,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selected(numCount: Optional): SelectAttribute; @@ -465,7 +498,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ value(resStr: Optional): SelectAttribute; @@ -494,7 +528,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): SelectAttribute; @@ -506,7 +541,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ font(selectFont: Optional): SelectAttribute; @@ -535,7 +571,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SelectAttribute; @@ -547,7 +584,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(resColor: Optional): SelectAttribute; @@ -576,7 +614,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionBgColor(value: ResourceColor): SelectAttribute; @@ -588,7 +627,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionBgColor(resColor: Optional): SelectAttribute; @@ -617,7 +657,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFont(value: Font): SelectAttribute; @@ -629,7 +670,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFont(selectFont: Optional): SelectAttribute; @@ -658,7 +700,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFontColor(value: ResourceColor): SelectAttribute; @@ -670,7 +713,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedOptionFontColor(resColor: Optional): SelectAttribute; @@ -699,7 +743,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionBgColor(value: ResourceColor): SelectAttribute; @@ -711,7 +756,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionBgColor(resColor: Optional): SelectAttribute; @@ -740,7 +786,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionFont(value: Font): SelectAttribute; @@ -752,7 +799,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionFont(selectFont: Optional): SelectAttribute; @@ -781,7 +829,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ optionFontColor(value: ResourceColor): SelectAttribute; @@ -793,7 +842,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionFontColor(resColor: Optional): SelectAttribute; @@ -834,7 +884,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelect(callback: Optional): SelectAttribute; @@ -855,7 +906,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ space(value: Length): SelectAttribute; @@ -867,7 +919,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ space(spaceLength: Optional): SelectAttribute; @@ -888,7 +941,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPosition(value: ArrowPosition): SelectAttribute; @@ -900,7 +954,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ arrowPosition(position: Optional): SelectAttribute; @@ -922,7 +977,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ menuAlign(alignType: MenuAlignType, offset?: Offset): SelectAttribute; @@ -935,7 +991,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuAlign(alignType: Optional, offset?: Offset): SelectAttribute; @@ -956,7 +1013,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ optionWidth(value: Dimension | OptionWidthMode ): SelectAttribute; @@ -968,7 +1026,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionWidth(width: Optional ): SelectAttribute; @@ -989,7 +1048,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ optionHeight(value: Dimension): SelectAttribute; @@ -1001,7 +1061,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ optionHeight(height: Optional): SelectAttribute; @@ -1022,7 +1083,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundColor(value: ResourceColor): SelectAttribute; @@ -1034,7 +1096,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundColor(resColor: Optional): SelectAttribute; @@ -1055,7 +1118,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(value: BlurStyle): SelectAttribute; @@ -1067,7 +1131,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuBackgroundBlurStyle(style: Optional): SelectAttribute; @@ -1079,7 +1144,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(value: ControlSize): SelectAttribute; @@ -1091,7 +1157,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ controlSize(size: Optional): SelectAttribute; @@ -1103,7 +1170,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: ContentModifier): SelectAttribute; @@ -1115,7 +1183,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ menuItemContentModifier(modifier: Optional>): SelectAttribute; @@ -1127,7 +1196,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ divider(options: Optional | null): SelectAttribute; @@ -1140,6 +1210,7 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ textModifier(modifier: Optional): SelectAttribute; @@ -1152,6 +1223,7 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ arrowModifier(modifier: Optional): SelectAttribute; @@ -1164,6 +1236,7 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ optionTextModifier(modifier: Optional): SelectAttribute; @@ -1176,6 +1249,7 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ selectedOptionTextModifier(modifier: Optional): SelectAttribute; @@ -1187,7 +1261,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ dividerStyle(style: Optional): SelectAttribute; @@ -1199,7 +1274,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ avoidance(mode: AvoidanceMode): SelectAttribute; @@ -1212,6 +1288,7 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ menuOutline(outline: MenuOutlineOptions): SelectAttribute; @@ -1248,7 +1325,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MenuItemConfiguration extends CommonConfiguration{ /** @@ -1258,7 +1336,8 @@ declare interface MenuItemConfiguration extends CommonConfiguration { /** @@ -457,7 +518,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ viewPort(value: ViewportRect): ShapeAttribute; @@ -497,7 +559,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stroke(value: ResourceColor): ShapeAttribute; @@ -537,7 +600,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill(value: ResourceColor): ShapeAttribute; @@ -571,7 +635,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the offset of the starting point of border drawing is set. * - * @param { number | string } value + * @param { Length } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -592,6 +656,20 @@ declare class ShapeAttribute extends CommonMethod { */ strokeDashOffset(value: Length): ShapeAttribute; + /** + * Called when the offset of the starting point of border drawing is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeDashOffset(value: number | string): ShapeAttribute; + /** * Called when the gap of the border is set. * @@ -632,6 +710,20 @@ declare class ShapeAttribute extends CommonMethod { */ strokeDashArray(value: Array): ShapeAttribute; + /** + * Called when the gap of the border is set. + * + * @param { Array } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeDashArray(value: Array): ShapeAttribute; + /** * Called when the path endpoint drawing style is set. * @@ -668,7 +760,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineCap(value: LineCapStyle): ShapeAttribute; @@ -708,7 +801,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeLineJoin(value: LineJoinStyle): ShapeAttribute; @@ -763,6 +857,20 @@ declare class ShapeAttribute extends CommonMethod { */ strokeMiterLimit(value: Length): ShapeAttribute; + /** + * Called when the limit value for drawing acute angles as oblique angles is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeMiterLimit(value: number | string): ShapeAttribute; + /** * Called when the opacity of the border is set. * @@ -799,12 +907,13 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeOpacity(value: number | string | Resource): ShapeAttribute; /** - * Called when the transparency of the border is set. + * Called when the transparency of the fill area is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } @@ -812,7 +921,7 @@ declare class ShapeAttribute extends CommonMethod { * @since 7 */ /** - * Called when the transparency of the border is set. + * Called when the transparency of the fill area is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } @@ -821,7 +930,7 @@ declare class ShapeAttribute extends CommonMethod { * @since 9 */ /** - * Called when the transparency of the border is set. + * Called when the transparency of the fill area is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } @@ -831,7 +940,7 @@ declare class ShapeAttribute extends CommonMethod { * @since 10 */ /** - * Called when the transparency of the border is set. + * Called when the transparency of the fill area is set. * * @param { number | string | Resource } value * @returns { ShapeAttribute } @@ -839,7 +948,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fillOpacity(value: number | string | Resource): ShapeAttribute; @@ -894,6 +1004,20 @@ declare class ShapeAttribute extends CommonMethod { */ strokeWidth(value: Length): ShapeAttribute; + /** + * Called when the width of the border is set. + * + * @param { number | string } value + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + strokeWidth(value: number | string): ShapeAttribute; + /** * Called when setting whether anti aliasing is on. * @@ -930,7 +1054,8 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ antiAlias(value: boolean): ShapeAttribute; @@ -981,6 +1106,22 @@ declare class ShapeAttribute extends CommonMethod { * @since 11 */ mesh(value: Array, column: number, row: number): ShapeAttribute; + + /** + * Called when shape mesh. + * + * @param { Array } value + * @param { number } column + * @param { number } row + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + mesh(value: Array, column: number, row: number): ShapeAttribute; } /** @@ -1046,3 +1187,29 @@ declare const Shape: ShapeInterface; * @since 11 */ declare const ShapeInstance: ShapeAttribute; + +/** + * Provides interfaces for drawing components. + * + * @interface ShapeInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface ShapeInterface { + /** + * Shape component constructor. + * + * @param { PixelMap } [value] - PixelMap object to draw. + * @returns { ShapeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (value?: PixelMap): ShapeAttribute; +} diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index 4622bd4555f349a4cc90c0b81a16c5a9dfff62e3..9633659be066558b97af701e7c4fe7c592b14b4d 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource' +import { Length, ResourceColor, Dimension } from './units' +import { CommonMethod, PixelMap } from './common' +/*** endif */ + /** * Sets the sidebar style of showing * @@ -40,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SideBarContainerType { /** @@ -62,7 +69,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Embed, @@ -85,7 +93,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Overlay, @@ -100,7 +109,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO, } @@ -127,7 +137,8 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SideBarPosition { /** @@ -149,7 +160,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -172,7 +184,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -184,7 +197,8 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonIconOptions { /** @@ -219,7 +233,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ shown: string | PixelMap | Resource; @@ -255,7 +270,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ hidden: string | PixelMap | Resource; @@ -291,7 +307,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ switching?: string | PixelMap | Resource; } @@ -318,7 +335,8 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ButtonStyle { /** @@ -346,7 +364,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left?: number; @@ -375,7 +394,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top?: number; @@ -404,7 +424,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number; @@ -433,7 +454,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; @@ -469,7 +491,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ icons?: ButtonIconOptions; } @@ -496,7 +519,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SideBarContainerInterface { /** @@ -524,7 +548,8 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (type?: SideBarContainerType): SideBarContainerAttribute; } @@ -546,7 +571,8 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DividerStyle { /** @@ -566,7 +592,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth: Length; @@ -585,7 +612,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -604,7 +632,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Length; @@ -623,7 +652,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Length; } @@ -650,7 +680,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SideBarContainerAttribute extends CommonMethod { /** @@ -678,7 +709,8 @@ declare class SideBarContainerAttribute extends CommonMethod void): SideBarContainerAttribute; @@ -797,7 +832,8 @@ declare class SideBarContainerAttribute extends CommonMethod void; @@ -855,7 +900,8 @@ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SliderConfiguration extends CommonConfiguration { /** @@ -865,7 +911,8 @@ declare interface SliderConfiguration extends CommonConfiguration } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + stepsAccessibility?: Map; +} + /** * Defines the options for customizing the accessibility of content within a slider. * These options can be used to enhance the user experience for assistive technologies. @@ -1109,7 +1206,8 @@ interface SliderSuffixOptions extends SliderCustomContentOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SliderAttribute extends CommonMethod { /** @@ -1148,7 +1246,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockColor(value: ResourceColor): SliderAttribute; @@ -1199,7 +1298,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackColor(value: ResourceColor | LinearGradient): SliderAttribute; @@ -1239,7 +1339,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): SliderAttribute; /** @@ -1251,7 +1352,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(selectedColor: ResourceColor | LinearGradient): SliderAttribute; @@ -1315,10 +1417,25 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showSteps(value: boolean): SliderAttribute; + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @param { SliderShowStepOptions } [options] + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + showSteps(value: boolean, options?: SliderShowStepOptions): SliderAttribute; + /** * Called when the percentage of bubble prompt is set when sliding. * @@ -1359,7 +1476,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showTips(value: boolean, content?: ResourceStr): SliderAttribute; @@ -1399,7 +1517,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackThickness(value: Length): SliderAttribute; @@ -1444,7 +1563,8 @@ declare class SliderAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (value: number, mode: SliderChangeMode) => void): SliderAttribute; @@ -1465,7 +1585,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockBorderColor(value: ResourceColor): SliderAttribute; @@ -1486,7 +1607,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockBorderWidth(value: Length): SliderAttribute; @@ -1507,7 +1629,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepColor(value: ResourceColor): SliderAttribute; @@ -1528,7 +1651,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ trackBorderRadius(value: Length): SliderAttribute; @@ -1540,7 +1664,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBorderRadius(value: Dimension): SliderAttribute; @@ -1561,7 +1686,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockSize(value: SizeOptions): SliderAttribute; @@ -1583,7 +1709,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blockStyle(value: SliderBlockStyle): SliderAttribute; @@ -1604,7 +1731,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stepSize(value: Length): SliderAttribute; @@ -1617,7 +1745,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sliderInteractionMode(value: SliderInteraction): SliderAttribute; @@ -1629,7 +1758,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minResponsiveDistance(value: number): SliderAttribute; @@ -1642,7 +1772,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): SliderAttribute; @@ -1654,7 +1785,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ slideRange(value: SlideRange): SliderAttribute; @@ -1666,7 +1798,8 @@ declare class SliderAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): SliderAttribute; @@ -1677,7 +1810,8 @@ declare class SliderAttribute extends CommonMethod { * @returns { SliderAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enabled: boolean): SliderAttribute; diff --git a/api/@internal/component/ets/span.d.ts b/api/@internal/component/ets/span.d.ts index cdeb16157e9fba88c242802faf9dfd3db018be61..53f6d44b5a4b451d14c75e542edfa0ee1e2c23b5 100644 --- a/api/@internal/component/ets/span.d.ts +++ b/api/@internal/component/ets/span.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Dimension, BorderRadiuses, Length, Font } from './units'; +import { CommonMethod, ShadowOptions } from './common'; +import { LengthMetrics } from './../Graphics'; +import { Resource } from './../../../api/global/resource'; +import { FontStyle, FontWeight, TextCase } from './enums'; +import { DecorationStyleInterface } from './styledString'; +/*** endif */ + /** * Define the background style of span. * @@ -33,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextBackgroundStyle { /** @@ -51,7 +61,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -70,7 +81,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: Dimension | BorderRadiuses; } @@ -90,7 +102,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaseSpan extends CommonMethod { /** @@ -110,7 +123,8 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textBackgroundStyle(style: TextBackgroundStyle): T; @@ -122,7 +136,8 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baselineOffset(value: LengthMetrics): T; } @@ -159,7 +174,8 @@ declare class BaseSpan extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SpanInterface { /** @@ -198,7 +214,8 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: string | Resource): SpanAttribute; } @@ -227,7 +244,8 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SpanAttribute extends BaseSpan { /** @@ -246,7 +264,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ font(value: Font): SpanAttribute; @@ -286,7 +305,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): SpanAttribute; @@ -326,7 +346,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SpanAttribute; @@ -366,7 +387,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): SpanAttribute; @@ -421,6 +443,20 @@ declare class SpanAttribute extends BaseSpan { */ fontWeight(value: number | FontWeight | ResourceStr): SpanAttribute; + /** + * Called when the font weight is set. + * + * @param { number | FontWeight | string } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + fontWeight(value: number | FontWeight | string): SpanAttribute; + /** * Called when the font list of text is set. * @@ -457,7 +493,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): SpanAttribute; @@ -508,7 +545,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): SpanAttribute; @@ -563,6 +601,20 @@ declare class SpanAttribute extends BaseSpan { */ letterSpacing(value: number | ResourceStr): SpanAttribute; + /** + * Called when the distance between text fonts is set. + * + * @param { number | string } value + * @returns { SpanAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + letterSpacing(value: number | string): SpanAttribute; + /** * Called when the type of letter in the text font is set. * @@ -599,7 +651,8 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textCase(value: TextCase): SpanAttribute; @@ -619,7 +672,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: Length): SpanAttribute; @@ -640,7 +694,8 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): SpanAttribute; } diff --git a/api/@internal/component/ets/stack.d.ts b/api/@internal/component/ets/stack.d.ts index 38790a319fe1b5dee03857a64d2dd8aa18244898..ccce79ba0264de8843d3758f9fd76f0d5f2769d6 100644 --- a/api/@internal/component/ets/stack.d.ts +++ b/api/@internal/component/ets/stack.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { PointLightStyle, CommonMethod } from './common'; +import { Alignment } from './enums'; +/*** endif */ + /** * Options used to construct the stack. * @@ -26,7 +31,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StackOptions { /** @@ -73,7 +79,8 @@ declare interface StackOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent?: Alignment; } @@ -110,7 +117,8 @@ declare interface StackOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StackInterface { /** @@ -161,7 +169,8 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: StackOptions): StackAttribute; } @@ -190,7 +199,8 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StackAttribute extends CommonMethod { /** @@ -229,7 +239,8 @@ declare class StackAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignContent(value: Alignment): StackAttribute; @@ -240,7 +251,8 @@ declare class StackAttribute extends CommonMethod { * @returns { StackAttribute } The attribute of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pointLight(value: PointLightStyle): StackAttribute; } diff --git a/api/@internal/component/ets/state_management.d.ts b/api/@internal/component/ets/state_management.d.ts index 7db8947e5c83e95aa17f2f194bea6131ba88fd2b..9edb4e29fafcca00af5bd0a6f5d9ff4ac3e61388 100644 --- a/api/@internal/component/ets/state_management.d.ts +++ b/api/@internal/component/ets/state_management.d.ts @@ -31,7 +31,8 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ColorMode { /** @@ -45,7 +46,8 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT = 0, @@ -60,7 +62,8 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DARK, } @@ -78,7 +81,8 @@ declare enum ColorMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutDirection { /** @@ -92,7 +96,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LTR, @@ -107,7 +112,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RTL, @@ -122,7 +128,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Auto, } @@ -132,7 +139,8 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Storage { /** @@ -142,7 +150,8 @@ declare class Storage { * @param { string } file * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(needCrossThread?: boolean, file?: string); @@ -153,7 +162,8 @@ declare class Storage { * @returns { string | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string): string | undefined; @@ -167,13 +177,26 @@ declare class Storage { * @since 7 */ set(key: string, val: any): void; + + /** + * Called when setting. + * + * @param { string } key + * @param { Object | undefined | null } val + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + set(key: string, val: Object | undefined | null): void; /** * Called when data is cleared. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ clear(): void; @@ -183,7 +206,8 @@ declare class Storage { * @param { string } key * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ delete(key: string): void; } diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts index f81675778720e5127981089466b785adb87e7ccd..a1611c0ff2ca9588ce65667f072c7aee9e314589 100644 --- a/api/@internal/component/ets/stepper.d.ts +++ b/api/@internal/component/ets/stepper.d.ts @@ -18,6 +18,45 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Bindable, CommonMethod } from './common' +/*** endif */ + +/** + * Declare the StepperOptions. + * + * @interface StepperOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +interface StepperOptions { + /** + * Set the stepper index. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + index?: number; + + /** + * Set the stepper index. + * + * @type { ?(number | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + index?: number | Bindable; +} + /** * Declare the stepper. * @@ -40,7 +79,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StepperInterface { /** @@ -71,6 +111,19 @@ interface StepperInterface { * @since 11 */ (value?: { index?: number }): StepperAttribute; + /** + * Called when the stepper component is used. + * + * Anonymous Object Rectification. + * @param { StepperOptions } value + * @returns { StepperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + (value?: StepperOptions): StepperAttribute; } /** @@ -95,7 +148,8 @@ interface StepperInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StepperAttribute extends CommonMethod { /** @@ -123,7 +177,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(callback: () => void): StepperAttribute; @@ -152,7 +207,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onSkip(callback: () => void): StepperAttribute; @@ -181,7 +237,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (prevIndex: number, index: number) => void): StepperAttribute; @@ -210,7 +267,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onNext(callback: (index: number, pendingIndex: number) => void): StepperAttribute; @@ -239,7 +297,8 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onPrevious(callback: (index: number, pendingIndex: number) => void): StepperAttribute; } diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts index 09673bc4925626bed75184c39964c2c1308f19cc..3fab51d1d05d572944ffb59e68d4530f881ee84d 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common' +/*** endif */ + /** * ItemState * @@ -40,7 +44,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ItemState { /** @@ -62,7 +67,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Normal, @@ -85,7 +91,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Disabled, @@ -108,7 +115,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Waiting, @@ -131,7 +139,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Skip, } @@ -158,7 +167,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface StepperItemInterface { /** @@ -183,7 +193,8 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): StepperItemAttribute; } @@ -210,7 +221,8 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StepperItemAttribute extends CommonMethod { /** @@ -238,7 +250,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ prevLabel(value: string): StepperItemAttribute; @@ -267,7 +280,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nextLabel(value: string): StepperItemAttribute; @@ -296,7 +310,8 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ status(value?: ItemState): StepperItemAttribute; } diff --git a/api/@internal/component/ets/styled_string.d.ts b/api/@internal/component/ets/styled_string.d.ts index 33df80776477273c0172e59c707afe97016f7162..45b24924e6438a393e4488cffbdc635ad2c0f80c 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -18,15 +18,26 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Callback, ShadowOptions, ClickEvent, Optional, PixelMap } from './common'; +import { TextAlign, FontStyle, FontWeight, TextDecorationType, TextDecorationStyle, WordBreak, TextOverflow, ImageFit, ImageSpanAlignment } from './enums'; +import { ResourceStr, ResourceColor, LengthMetrics, SizeOptions, Margin, Padding, BorderRadiuses, ColorFilter } from './units'; +import { TextBackgroundStyle } from './span'; +import { GestureEvent } from "./gesture"; +import { DrawingColorFilter } from './image'; +import { LeadingMarginPlaceholder } from './richEditor'; +import image from '../../@ohos.multimedia.image'; +import { DrawContext } from '../../arkui/Graphics'; +/*** endif */ + /** * Defines the StyledStringMarshallingValue Type. * * @typedef { UserDataSpan } StyledStringMarshallingValue * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @crossplatform - * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringMarshallingValue = UserDataSpan; @@ -39,9 +50,8 @@ declare type StyledStringMarshallingValue = UserDataSpan; * @returns { ArrayBuffer } Array buffer from the serialized marshalling value * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @crossplatform - * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarshallingValue) => ArrayBuffer; @@ -53,9 +63,8 @@ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarsha * @returns { StyledStringMarshallingValue } Marshalling value from the deserialized ArrayBuffer. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @crossplatform - * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringUnmarshallCallback = (buf: ArrayBuffer) => StyledStringMarshallingValue; @@ -65,7 +74,8 @@ declare type StyledStringUnmarshallCallback = (buf: ArrayBuffer) => StyledString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class StyledString { /** @@ -76,7 +86,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: string | ImageAttachment | CustomSpan, styles?: Array); @@ -88,7 +99,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly length: number; @@ -99,7 +111,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getString(): string; @@ -117,7 +130,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStyles(start: number, length: number, styledKey?: StyledStringKey): Array; @@ -129,7 +143,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ equals(other: StyledString): boolean; @@ -146,7 +161,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subStyledString(start: number, length?: number): StyledString; @@ -162,7 +178,8 @@ declare class StyledString { * @throws { BusinessError } 170001 - Convert Error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static fromHtml(html: string): Promise; @@ -178,7 +195,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ static toHtml(styledString: StyledString): string; @@ -190,7 +208,8 @@ declare class StyledString { * @returns { ArrayBuffer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ static marshalling(styledString: StyledString, callback: StyledStringMarshallCallback): ArrayBuffer; @@ -207,7 +226,8 @@ declare class StyledString { * @throws { BusinessError } 170002 - Styled string decode error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ static unmarshalling(buffer: ArrayBuffer, callback: StyledStringUnmarshallCallback): Promise; @@ -218,7 +238,8 @@ declare class StyledString { * @returns { ArrayBuffer } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static marshalling(styledString: StyledString): ArrayBuffer; @@ -234,7 +255,8 @@ declare class StyledString { * @throws { BusinessError } 170002 - Styled string decode error. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static unmarshalling(buffer: ArrayBuffer): Promise; } @@ -246,7 +268,8 @@ declare class StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyleOptions { /** @@ -256,7 +279,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -267,7 +291,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length?: number; @@ -278,7 +303,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledKey: StyledStringKey; @@ -289,7 +315,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledValue: StyledStringValue; } @@ -301,7 +328,8 @@ declare interface StyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SpanStyle { /** @@ -311,7 +339,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start: number; @@ -322,7 +351,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length: number; @@ -333,7 +363,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledKey: StyledStringKey; @@ -344,7 +375,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ styledValue: StyledStringValue; } @@ -355,7 +387,8 @@ declare interface SpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextStyle { @@ -366,7 +399,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: TextStyleInterface); @@ -378,7 +412,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontColor?: ResourceColor; @@ -390,7 +425,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontFamily?: string; @@ -403,7 +439,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontSize?: number; @@ -415,7 +452,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontWeight?: number; @@ -427,7 +465,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fontStyle?: FontStyle; @@ -475,7 +514,8 @@ declare class TextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextStyleInterface { /** @@ -485,7 +525,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor?: ResourceColor; @@ -496,7 +537,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: ResourceStr; @@ -507,7 +549,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: LengthMetrics; @@ -518,7 +561,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | string; @@ -529,7 +573,8 @@ declare interface TextStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -595,7 +640,8 @@ declare interface DecorationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DecorationStyle { @@ -606,7 +652,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: DecorationStyleInterface); @@ -630,7 +677,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: TextDecorationType; @@ -642,7 +690,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly color?: ResourceColor; @@ -654,7 +703,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly style?: TextDecorationStyle; @@ -690,7 +740,8 @@ declare class DecorationStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DecorationStyleInterface { /** @@ -700,7 +751,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: TextDecorationType; @@ -711,7 +763,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -722,7 +775,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: TextDecorationStyle; @@ -744,7 +798,8 @@ declare interface DecorationStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaselineOffsetStyle { @@ -755,7 +810,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: LengthMetrics); @@ -768,7 +824,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly baselineOffset: number; } @@ -779,7 +836,8 @@ declare class BaselineOffsetStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LetterSpacingStyle { @@ -790,7 +848,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: LengthMetrics); @@ -803,7 +862,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly letterSpacing: number; } @@ -814,7 +874,8 @@ declare class LetterSpacingStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextShadowStyle { @@ -825,7 +886,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: ShadowOptions | Array); @@ -837,7 +899,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textShadow: Array; } @@ -848,7 +911,8 @@ declare class TextShadowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BackgroundColorStyle { @@ -859,7 +923,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(textBackgroundStyle: TextBackgroundStyle); @@ -871,7 +936,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textBackgroundStyle: TextBackgroundStyle; } @@ -882,7 +948,8 @@ declare class BackgroundColorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class GestureStyle { @@ -893,7 +960,8 @@ declare class GestureStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: GestureStyleInterface); } @@ -905,7 +973,8 @@ declare class GestureStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface GestureStyleInterface { /** @@ -915,7 +984,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onClick?: Callback; @@ -926,7 +996,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onLongPress?: Callback; @@ -948,7 +1019,8 @@ declare interface GestureStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ParagraphStyle { @@ -959,7 +1031,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value?: ParagraphStyleInterface); @@ -971,7 +1044,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textAlign?: TextAlign; @@ -996,7 +1070,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly textIndent?: number; @@ -1008,7 +1083,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly maxLines?: number; @@ -1020,7 +1096,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly overflow?: TextOverflow; @@ -1032,7 +1109,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly wordBreak?: WordBreak; @@ -1044,7 +1122,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly leadingMargin?: number | LeadingMarginPlaceholder; @@ -1057,7 +1136,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly paragraphSpacing?: number; } @@ -1069,7 +1149,8 @@ declare class ParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ParagraphStyleInterface { /** @@ -1079,7 +1160,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign?: TextAlign; @@ -1101,7 +1183,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent?: LengthMetrics; @@ -1112,7 +1195,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines?: number; @@ -1123,7 +1207,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ overflow?: TextOverflow; @@ -1134,7 +1219,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -1145,7 +1231,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leadingMargin?: LengthMetrics | LeadingMarginPlaceholder; @@ -1156,7 +1243,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ paragraphSpacing?: LengthMetrics; } @@ -1167,7 +1255,8 @@ declare interface ParagraphStyleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LineHeightStyle { @@ -1178,7 +1267,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(lineHeight: LengthMetrics); @@ -1191,7 +1281,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly lineHeight: number; } @@ -1203,7 +1294,8 @@ declare class LineHeightStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare class UrlStyle { @@ -1214,7 +1306,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(url: string); @@ -1226,7 +1319,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly url: string; } @@ -1252,7 +1346,8 @@ declare class UrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type StyledStringValue = TextStyle | DecorationStyle | BaselineOffsetStyle | LetterSpacingStyle | TextShadowStyle | GestureStyle | ImageAttachment | ParagraphStyle | LineHeightStyle | UrlStyle | CustomSpan | @@ -1265,9 +1360,23 @@ UserDataSpan | BackgroundColorStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MutableStyledString extends StyledString { + /** + * constructor. + * + * @param { string | ImageAttachment | CustomSpan } value - indicates the current object value of the MutableStyledString. + * @param { Array } [styles] - indicates the SpanStyle objects. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(value: string | ImageAttachment | CustomSpan, styles?: Array); + /** * Replace the string of the specified range. * @@ -1281,7 +1390,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceString(start: number, length: number, other: string): void; @@ -1297,7 +1407,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertString(start: number, other: string): void; @@ -1313,7 +1424,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeString(start: number, length: number): void; @@ -1328,7 +1440,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceStyle(spanStyle: SpanStyle): void; @@ -1340,7 +1453,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyle(spanStyle: SpanStyle): void; @@ -1357,7 +1471,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeStyle(start: number, length: number, styledKey: StyledStringKey): void; @@ -1373,7 +1488,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeStyles(start: number, length: number): void; @@ -1383,7 +1499,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearStyles(): void; @@ -1400,7 +1517,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replaceStyledString(start: number, length: number, other: StyledString): void; @@ -1416,7 +1534,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertStyledString(start: number, other: StyledString): void; @@ -1427,7 +1546,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appendStyledString(other: StyledString): void; } @@ -1440,7 +1560,8 @@ declare class MutableStyledString extends StyledString { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum StyledStringKey { /** @@ -1449,7 +1570,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FONT = 0, @@ -1459,7 +1581,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DECORATION = 1, @@ -1469,7 +1592,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BASELINE_OFFSET = 2, @@ -1479,7 +1603,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LETTER_SPACING = 3, @@ -1489,7 +1614,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_SHADOW = 4, @@ -1499,7 +1625,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LINE_HEIGHT = 5, @@ -1509,7 +1636,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_COLOR = 6, @@ -1519,7 +1647,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 7, @@ -1529,7 +1658,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GESTURE = 100, @@ -1539,7 +1669,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PARAGRAPH_STYLE = 200, @@ -1549,7 +1680,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 300, @@ -1559,7 +1691,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM_SPAN = 400, @@ -1569,7 +1702,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USER_DATA = 500, } @@ -1580,7 +1714,8 @@ declare enum StyledStringKey { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ImageAttachment { @@ -1606,6 +1741,18 @@ declare class ImageAttachment { */ constructor(attachment: Optional); + /** + * constructor supported by AttachmentType. + * + * @param { ImageAttachmentInterface | Optional } attachment - image attachment object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + constructor(value: ImageAttachmentInterface | Optional); + /** * Get the image content of the StyledString. * @@ -1614,7 +1761,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly value: PixelMap; @@ -1626,10 +1774,23 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly size?: SizeOptions; + /** + * Get the imageSize of the StyledString. + * + * @type { ?SizeOptions } - the imageSize of the StyledString in vp unit or undefined + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + readonly sizeInVp?: SizeOptions; + /** * Get the ImageSpanAlignment of the StyledString. * @@ -1638,7 +1799,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly verticalAlign?: ImageSpanAlignment; @@ -1650,7 +1812,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly objectFit?: ImageFit; @@ -1662,7 +1825,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly layoutStyle?: ImageAttachmentLayoutStyle; @@ -1674,7 +1838,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ readonly colorFilter?: ColorFilterType; } @@ -1686,7 +1851,8 @@ declare class ImageAttachment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ResourceImageAttachmentOptions { /** @@ -1696,7 +1862,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ resourceValue: Optional; @@ -1707,7 +1874,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeOptions; @@ -1718,7 +1886,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -1729,7 +1898,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -1740,7 +1910,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: ImageAttachmentLayoutStyle; @@ -1751,7 +1922,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter?: ColorFilterType; @@ -1763,7 +1935,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ syncLoad?: boolean; } @@ -1775,7 +1948,8 @@ declare interface ResourceImageAttachmentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAttachmentInterface { /** @@ -1785,7 +1959,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: PixelMap; @@ -1796,7 +1971,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size?: SizeOptions; @@ -1807,7 +1983,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign?: ImageSpanAlignment; @@ -1818,7 +1995,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit?: ImageFit; @@ -1829,7 +2007,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutStyle?: ImageAttachmentLayoutStyle; @@ -1840,7 +2019,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ colorFilter?: ColorFilterType; } @@ -1852,7 +2032,8 @@ declare interface ImageAttachmentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachmentOptions; @@ -1863,7 +2044,8 @@ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachment * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ColorFilterType = ColorFilter | DrawingColorFilter; @@ -1874,7 +2056,8 @@ declare type ColorFilterType = ColorFilter | DrawingColorFilter; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ImageAttachmentLayoutStyle { /** @@ -1884,7 +2067,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: LengthMetrics | Margin; @@ -1895,7 +2079,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding?: LengthMetrics | Padding; @@ -1906,7 +2091,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: LengthMetrics | BorderRadiuses; } @@ -1918,7 +2104,8 @@ declare interface ImageAttachmentLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanMetrics { /** @@ -1930,7 +2117,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -1942,7 +2130,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; } @@ -1954,7 +2143,8 @@ declare interface CustomSpanMetrics { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanDrawInfo { /** @@ -1965,7 +2155,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -1977,7 +2168,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineTop: number; @@ -1989,7 +2181,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBottom: number; @@ -2001,7 +2194,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baseline: number; } @@ -2013,7 +2207,8 @@ declare interface CustomSpanDrawInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface CustomSpanMeasureInfo { /** @@ -2024,7 +2219,8 @@ declare interface CustomSpanMeasureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize: number; } @@ -2035,7 +2231,8 @@ declare interface CustomSpanMeasureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare abstract class CustomSpan { /** @@ -2046,7 +2243,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ abstract onMeasure(measureInfo: CustomSpanMeasureInfo) : CustomSpanMetrics; @@ -2058,7 +2256,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ abstract onDraw(context: DrawContext, drawInfo: CustomSpanDrawInfo): void; @@ -2068,7 +2267,8 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ invalidate(): void; } @@ -2079,6 +2279,7 @@ declare abstract class CustomSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare abstract class UserDataSpan {} \ No newline at end of file diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index d5b6bf321f5c308a5dd851eb831b43829c366f52..da51e138b95f1ffcd90b5da116c569b0db497b6c 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { IndicatorComponentController } from './indicatorcomponent'; +import { CommonMethod, Callback, ICurve, Optional } from './common'; +import { EdgeEffect, Curve, PageFlipMode } from './enums'; +import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './units'; +/*** endif */ + /** * Provides methods for switching components. * @@ -39,7 +46,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwiperController { /** @@ -63,7 +71,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -92,6 +101,18 @@ declare class SwiperController { */ showNext(); + /** + * Called when the next child component is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + showNext(): void; + /** * Called when the previous subcomponent is displayed. * @@ -117,6 +138,18 @@ declare class SwiperController { */ showPrevious(); + /** + * Called when the previous subcomponent is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + showPrevious(): void; + /** * Controlling Swiper to change to the specified subcomponent. * @@ -145,6 +178,21 @@ declare class SwiperController { */ changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean); + /** + * Controlling Swiper to change to the specified subcomponent. + * + * @param { number } index - the index of item to be redirected. + * @param { SwiperAnimationMode | boolean } [animationMode] - animation mode for changeIndex, + * true is equivalent to SwiperAnimationMode.DEFAULT_ANIMATION, false is equivalent to SwiperAnimationMode.NO_ANIMATION + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean): void; + /** * Called when need to stop the swiper animation. * @@ -184,6 +232,19 @@ declare class SwiperController { */ finishAnimation(callback?: VoidCallback); + /** + * Called when need to stop the swiper animation. + * + * @param { ?VoidCallback } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + finishAnimation(callback?: VoidCallback): void; + /** * Called when need to preload specified child. * @@ -198,7 +259,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ preloadItems(indices: Optional>): Promise; } @@ -218,7 +280,8 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class Indicator { /** @@ -240,7 +303,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ left(value: Length): T; @@ -263,7 +327,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ top(value: Length): T; @@ -287,7 +352,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ right(value: Length): T; @@ -311,7 +377,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bottom(value: Length): T; @@ -320,7 +387,7 @@ declare class Indicator { * You can also choose to ignore the size of the navigation indicator using the ignoreSize property. * * @param { LengthMetrics | Length } bottom - the offset of indicator to the bottom. - * @param { boolean } ignoreSize - ignore the size of the indicator. + * @param { boolean } ignoreSize - ignore the size of the indicator.Default value: false. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -334,13 +401,15 @@ declare class Indicator { * Sets the distance between the navigation indicator and the right edge (in right-to-left scripts) * or the left edge (in left-to-right scripts) of the Swiper component. * - * @param { LengthMetrics } value - the indicator to the right in LTR, indicator to the left in RTL + * @param { LengthMetrics } value - the indicator to the right in LTR, indicator to the left in RTL. + * Default value: 0.Unit: vp. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(value: LengthMetrics): T; @@ -348,13 +417,15 @@ declare class Indicator { * Sets the distance between the navigation indicator and the left edge (in right-to-left scripts) * or the right edge (in left-to-right scripts) of the Swiper component. * - * @param { LengthMetrics } value - the indicator to the left in RTL, Set the indicator to the right in LTR + * @param { LengthMetrics } value - the indicator to the left in RTL, Set the indicator to the right in LTR. + * Default value: 0.Unit: vp. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end(value: LengthMetrics): T; @@ -377,7 +448,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static dot(): DotIndicator; @@ -400,7 +472,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static digit(): DigitIndicator; } @@ -422,7 +495,8 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DotIndicator extends Indicator { /** @@ -440,7 +514,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -464,7 +539,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemWidth(value: Length): DotIndicator; @@ -488,7 +564,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemHeight(value: Length): DotIndicator; @@ -506,13 +583,14 @@ declare class DotIndicator extends Indicator { * Sets the width of the selected dot in the dot-style navigation indicator. * * @param { Length } value - Width of the selected dot in the dot-style navigation indicator. - * Default value is 12vp. This parameter cannot be set in percentage. + * Default value is 6vp. This parameter cannot be set in percentage. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedItemWidth(value: Length): DotIndicator; @@ -536,7 +614,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedItemHeight(value: Length): DotIndicator; @@ -560,7 +639,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mask(value: boolean): DotIndicator; @@ -584,7 +664,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color(value: ResourceColor): DotIndicator; @@ -608,7 +689,8 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): DotIndicator; @@ -616,24 +698,27 @@ declare class DotIndicator extends Indicator { * Sets the maximum number of navigation dots in the dot-style navigation indicator. * * @param { number } maxDisplayCount - Maximum number of navigation dots in the dot-style navigation indicator. + * Value range: [6, 9]. * @returns { DotIndicator } return the DotIndicator * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxDisplayCount(maxDisplayCount: number): DotIndicator; /** * Set the space between dots. * - * @param { LengthMetrics } space - the space between dots + * @param { LengthMetrics } space - the space between dots.Default value: 8.Unit: vp. * @returns { DotIndicator } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ space(space: LengthMetrics): DotIndicator; } @@ -662,7 +747,8 @@ declare class DotIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperAutoFill { /** @@ -675,10 +761,11 @@ declare interface SwiperAutoFill { /** * Set minSize size. * - * @type { VP } + * @type { VP } - Minimum width of the element.Default value: 0. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ minSize: VP; @@ -701,7 +788,8 @@ declare interface SwiperAutoFill { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class DigitIndicator extends Indicator { /** @@ -719,7 +807,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -742,7 +831,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): DigitIndicator; @@ -766,7 +856,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedFontColor(value: ResourceColor): DigitIndicator; @@ -795,7 +886,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ digitFont(value: Font): DigitIndicator; @@ -819,7 +911,8 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedDigitFont(value: Font): DigitIndicator; } @@ -838,7 +931,8 @@ declare class DigitIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ArrowStyle { /** @@ -857,7 +951,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showBackground?: boolean; @@ -879,7 +974,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSidebarMiddle?: boolean; @@ -901,7 +997,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundSize?: Length; @@ -921,7 +1018,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -945,7 +1043,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowSize?: Length; @@ -965,7 +1064,8 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ arrowColor?: ResourceColor; } @@ -994,7 +1094,8 @@ declare interface ArrowStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperDisplayMode { /** @@ -1034,7 +1135,8 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STRETCH, @@ -1084,7 +1186,8 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SwiperInterface { /** @@ -1114,7 +1217,8 @@ interface SwiperInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (controller?: SwiperController): SwiperAttribute; } @@ -1224,7 +1328,8 @@ declare interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperAnimationEvent { /** @@ -1243,7 +1348,8 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ currentOffset: number; @@ -1263,7 +1369,8 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ targetOffset: number; @@ -1283,7 +1390,8 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } @@ -1296,7 +1404,8 @@ declare interface SwiperAnimationEvent { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AutoPlayOptions { /** @@ -1308,7 +1417,8 @@ declare interface AutoPlayOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ stopWhenTouched: boolean; } @@ -1319,7 +1429,8 @@ declare interface AutoPlayOptions { * @enum { number } SwiperNestedScrollMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperNestedScrollMode { /** @@ -1328,7 +1439,8 @@ declare enum SwiperNestedScrollMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_ONLY = 0, @@ -1337,7 +1449,8 @@ declare enum SwiperNestedScrollMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SELF_FIRST = 1, } @@ -1350,7 +1463,8 @@ declare enum SwiperNestedScrollMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SwiperAnimationMode { /** @@ -1360,7 +1474,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NO_ANIMATION = 0, @@ -1371,7 +1486,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT_ANIMATION = 1, @@ -1383,7 +1499,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FAST_ANIMATION = 2, } @@ -1399,7 +1516,8 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void; @@ -1413,7 +1531,8 @@ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: numbe * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1426,7 +1545,8 @@ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAni * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1454,7 +1574,8 @@ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAni * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SwiperAttribute extends CommonMethod { /** @@ -1486,7 +1607,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index(value: number): SwiperAttribute; @@ -1547,7 +1669,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ autoPlay(autoPlay: boolean, options: AutoPlayOptions): SwiperAttribute; @@ -1579,7 +1702,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interval(value: number): SwiperAttribute; @@ -1625,7 +1749,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ indicator(indicator: IndicatorComponentController | DotIndicator | DigitIndicator | boolean): SwiperAttribute; @@ -1648,7 +1773,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayArrow(value: ArrowStyle | boolean, isHoverShow?: boolean): SwiperAttribute; @@ -1679,7 +1805,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): SwiperAttribute; @@ -1709,7 +1836,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration(value: number): SwiperAttribute; @@ -1740,7 +1868,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): SwiperAttribute; @@ -1778,7 +1907,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ itemSpace(value: number | string): SwiperAttribute; @@ -1811,7 +1941,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayMode(value: SwiperDisplayMode): SwiperAttribute; @@ -1848,7 +1979,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(value: number): SwiperAttribute; @@ -1864,7 +1996,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ cachedCount(count: number, isShown: boolean): SwiperAttribute; @@ -1903,7 +2036,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ displayCount(value: number | string | SwiperAutoFill, swipeByGroup?: boolean): SwiperAttribute; @@ -1939,7 +2073,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ effectMode(value: EdgeEffect): SwiperAttribute; @@ -1970,7 +2105,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disableSwipe(value: boolean): SwiperAttribute; @@ -2006,7 +2142,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ curve(value: Curve | string | ICurve): SwiperAttribute; @@ -2049,7 +2186,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(event: Callback): SwiperAttribute; @@ -2062,7 +2200,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelected(event: Callback): SwiperAttribute; @@ -2117,7 +2256,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prevMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2161,7 +2301,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ nextMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2174,7 +2315,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUnselected(event: Callback): SwiperAttribute; @@ -2236,7 +2378,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationStart(event: OnSwiperAnimationStartCallback): SwiperAttribute; @@ -2283,7 +2426,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationEnd(event: OnSwiperAnimationEndCallback): SwiperAttribute; @@ -2319,7 +2463,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureSwipe(event: OnSwiperGestureSwipeCallback): SwiperAttribute; @@ -2338,7 +2483,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: SwiperNestedScrollMode): SwiperAttribute; @@ -2359,7 +2505,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customContentTransition(transition: SwiperContentAnimatedTransition): SwiperAttribute; @@ -2384,7 +2531,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onContentDidScroll(handler: ContentDidScrollCallback): SwiperAttribute; @@ -2396,7 +2544,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicatorInteractive(value: boolean): SwiperAttribute; @@ -2409,7 +2558,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pageFlipMode(mode: Optional): SwiperAttribute; @@ -2422,7 +2572,8 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onContentWillScroll(handler: ContentWillScrollCallback): SwiperAttribute; @@ -2448,7 +2599,8 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentAnimatedTransition { /** @@ -2460,7 +2612,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -2471,7 +2624,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transition: Callback; } @@ -2483,7 +2637,8 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentTransitionProxy { /** @@ -2493,7 +2648,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedIndex: number; @@ -2504,7 +2660,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -2515,7 +2672,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: number; @@ -2526,7 +2684,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mainAxisLength: number; @@ -2536,7 +2695,8 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; } @@ -2549,7 +2709,8 @@ declare interface SwiperContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwiperContentWillScrollResult { /** @@ -2560,7 +2721,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ currentIndex: number; @@ -2572,7 +2734,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ comingIndex: number; @@ -2585,7 +2748,8 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; } @@ -2601,7 +2765,8 @@ declare interface SwiperContentWillScrollResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, position: number, mainAxisLength: number) => void; @@ -2615,7 +2780,8 @@ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, p * @crossplatform * @form * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) => boolean; diff --git a/api/@internal/component/ets/symbol_span.d.ts b/api/@internal/component/ets/symbol_span.d.ts index c11965a765e2aed98e742e75d274dfd563516d31..d78fc42c8c89daecb28934b517def4dd185eae4c 100644 --- a/api/@internal/component/ets/symbol_span.d.ts +++ b/api/@internal/component/ets/symbol_span.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from './../../../api/global/resource'; +import { CommonMethod, AttributeModifier } from './common'; +import { ResourceColor } from './units'; +import { FontWeight } from './enums'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; +/*** endif */ + /** * Provides an interface for SymbolSpan. * @@ -43,6 +51,7 @@ * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ interface SymbolSpanInterface { /** @@ -73,6 +82,7 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ (value: Resource): SymbolSpanAttribute; } @@ -102,6 +112,7 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class SymbolSpanAttribute extends CommonMethod { /** @@ -132,6 +143,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SymbolSpanAttribute; @@ -163,6 +175,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontColor(value: Array): SymbolSpanAttribute; @@ -194,6 +207,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): SymbolSpanAttribute; @@ -225,6 +239,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ effectStrategy(value: SymbolEffectStrategy): SymbolSpanAttribute; @@ -256,6 +271,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ renderingStrategy(value: SymbolRenderingStrategy): SymbolSpanAttribute; @@ -277,6 +293,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ attributeModifier(modifier: AttributeModifier): SymbolSpanAttribute; } diff --git a/api/@internal/component/ets/symbolglyph.d.ts b/api/@internal/component/ets/symbolglyph.d.ts index 9b9ad64302d868ac9363df80e5bf610ab5cc04f4..f1411ec178cdd07cb7fe7d2fbca32aa374b58a08 100644 --- a/api/@internal/component/ets/symbolglyph.d.ts +++ b/api/@internal/component/ets/symbolglyph.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceColor } from './units'; +import { FontWeight } from './enums'; +import { CommonMethod,Optional } from "./common"; +/*** endif */ + /** * Provides an interface for SymbolGlyph. * @@ -43,6 +50,7 @@ * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ interface SymbolGlyphInterface { /** @@ -73,6 +81,7 @@ interface SymbolGlyphInterface { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ (value?: Resource): SymbolGlyphAttribute; } @@ -102,6 +111,7 @@ interface SymbolGlyphInterface { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare enum SymbolRenderingStrategy { /** @@ -126,6 +136,7 @@ declare enum SymbolRenderingStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ SINGLE = 0, @@ -151,6 +162,7 @@ declare enum SymbolRenderingStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ MULTIPLE_COLOR = 1, @@ -176,6 +188,7 @@ declare enum SymbolRenderingStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ MULTIPLE_OPACITY = 2, } @@ -205,6 +218,7 @@ declare enum SymbolRenderingStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare enum SymbolEffectStrategy { /** @@ -229,6 +243,7 @@ declare enum SymbolEffectStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ NONE = 0, @@ -254,6 +269,7 @@ declare enum SymbolEffectStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ SCALE = 1, @@ -279,6 +295,7 @@ declare enum SymbolEffectStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ HIERARCHICAL = 2, } @@ -301,6 +318,7 @@ declare enum SymbolEffectStrategy { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare enum EffectDirection { /** @@ -319,6 +337,7 @@ declare enum EffectDirection { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ DOWN = 0, /** @@ -337,6 +356,7 @@ declare enum EffectDirection { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ UP = 1, } @@ -359,6 +379,7 @@ declare enum EffectDirection { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare enum EffectScope { /** @@ -377,6 +398,7 @@ declare enum EffectScope { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ LAYER = 0, /** @@ -395,6 +417,7 @@ declare enum EffectScope { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ WHOLE = 1, } @@ -417,6 +440,7 @@ declare enum EffectScope { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare enum EffectFillStyle { /** @@ -435,6 +459,7 @@ declare enum EffectFillStyle { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ CUMULATIVE = 0, @@ -454,10 +479,59 @@ declare enum EffectFillStyle { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ ITERATIVE = 1, } +/** + * The replace effect type of symbol. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ +declare enum ReplaceEffectType { + /** + * The default replace effect of symbol, the current symbol fully disappears before the new symbol fades in. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + SEQUENTIAL = 0, + + /** + * The current symbol fades out while the new symbol fades in at the same time, + * producing a smoother and faster transition. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + CROSS_FADE = 1, + + /** + * Replaces the current symbol with a symbol that includes a diagonal slash overlay, + * typically used to indicate a disabled or inactive state. + * If a corresponding slashed symbol variant is not available, the symbol is replaced without animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + SLASH_OVERLAY = 2, +} + /** * Defines SymbolEffect class. * @@ -474,6 +548,7 @@ declare enum EffectFillStyle { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class SymbolEffect { } @@ -496,6 +571,7 @@ declare class SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class ScaleSymbolEffect extends SymbolEffect { /** @@ -518,6 +594,7 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -539,6 +616,7 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ scope?: EffectScope; @@ -560,6 +638,7 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ direction?: EffectDirection; } @@ -582,6 +661,7 @@ declare class ScaleSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class HierarchicalSymbolEffect extends SymbolEffect { /** @@ -602,6 +682,7 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(fillStyle?: EffectFillStyle); @@ -623,6 +704,7 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fillStyle?: EffectFillStyle; } @@ -645,6 +727,7 @@ declare class HierarchicalSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class AppearSymbolEffect extends SymbolEffect { /** @@ -665,6 +748,7 @@ declare class AppearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); @@ -686,6 +770,7 @@ declare class AppearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ scope?: EffectScope; } @@ -708,6 +793,7 @@ declare class AppearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class DisappearSymbolEffect extends SymbolEffect { /** @@ -728,6 +814,7 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); @@ -749,6 +836,7 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ scope?: EffectScope; } @@ -771,6 +859,7 @@ declare class DisappearSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class BounceSymbolEffect extends SymbolEffect { /** @@ -793,6 +882,7 @@ declare class BounceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope, direction?: EffectDirection); @@ -814,6 +904,7 @@ declare class BounceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ scope?: EffectScope; @@ -835,6 +926,7 @@ declare class BounceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ direction?: EffectDirection; } @@ -857,6 +949,7 @@ declare class BounceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class ReplaceSymbolEffect extends SymbolEffect { /** @@ -877,8 +970,21 @@ declare class ReplaceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(scope?: EffectScope); + + /** + * constructor. + * @param { EffectScope } [scope] - The scope type of symbol effect. + * @param { ReplaceEffectType } [replaceType] - The replace effect type of symbol effect. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + constructor(scope?: EffectScope, replaceType?: ReplaceEffectType); /** * The scope type of symbol effect @@ -898,86 +1004,34 @@ declare class ReplaceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ scope?: EffectScope; -} - -/** - * Defines PulseSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ -declare class PulseSymbolEffect extends SymbolEffect { -} - -/** - * Defines DisableSymbolEffect class. - * - * @extends SymbolEffect - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 20 - */ -declare class DisableSymbolEffect extends SymbolEffect { - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 20 - */ - constructor(scope?: EffectScope); /** - * The scope type of symbol effect + * The replace effect type of symbol effect. * - * @type { ?EffectScope } + * @type { ?ReplaceEffectType } * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform * @form * @atomicservice * @since 20 */ - scope?: EffectScope; + replaceType?: ReplaceEffectType; } /** - * Defines QuickReplaceSymbolEffect class. + * Defines PulseSymbolEffect class. * * @extends SymbolEffect * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 20 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ -declare class QuickReplaceSymbolEffect extends SymbolEffect { - /** - * constructor. - * - * @param { EffectScope } [scope] - The scope type of symbol effect. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 20 - */ - constructor(scope?: EffectScope); - - /** - * The scope type of symbol effect - * - * @type { ?EffectScope } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 20 - */ - scope?: EffectScope; +declare class PulseSymbolEffect extends SymbolEffect { } /** @@ -1005,6 +1059,7 @@ declare class QuickReplaceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class SymbolGlyphAttribute extends CommonMethod { /** @@ -1035,6 +1090,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SymbolGlyphAttribute; @@ -1066,19 +1122,28 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontColor(value: Array): SymbolGlyphAttribute; /** * Set the shader style of the symbol, such as lineargradient or radialgradient. * - * @param { Array } shaders - The shaders style of the symbol. + * If a single `ShaderStyle` is provided, all layers of the symbol will use this shader style. + * If an array is provided, each item corresponds to the shader style of the matching symbol layer. + * - If an array item is `undefined`, that layer will use its default color. + * - Any layers beyond the length of the array will also use their default color. + * + * @param { Array | ShaderStyle } shader - The shader style(s) to apply. + * - `ShaderStyle`: Apply the same shader style to all symbol layers. + * - `Array`: Specify shader styles per layer; `undefined` means default + * color for that layer. * @returns { SymbolGlyphAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ - shaderStyle(shaders: Array): SymbolGlyphAttribute; + shaderStyle(shader: Array | ShaderStyle): SymbolGlyphAttribute; /** * Called when the font symbolGlyph weight is set. @@ -1108,6 +1173,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): SymbolGlyphAttribute; @@ -1139,6 +1205,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ effectStrategy(value: SymbolEffectStrategy): SymbolGlyphAttribute; @@ -1170,6 +1237,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ renderingStrategy(value: SymbolRenderingStrategy): SymbolGlyphAttribute; @@ -1222,6 +1290,21 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @since 20 */ symbolEffect(symbolEffect: SymbolEffect, triggerValue?: number): SymbolGlyphAttribute; + + /** + * Define effect options for SymbolGlyph. + * + * @param { SymbolEffect } [symbolEffect] - The symbol effect type + * @param { boolean | number } [triggerValue] - The trigger of the effect + * @returns { SymbolGlyphAttribute } The attribute of the SymbolGlyph. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + symbolEffect(symbolEffect: SymbolEffect, triggerValue?: boolean | number): SymbolGlyphAttribute; /** * Called when the minimum font scale of the font is set. @@ -1241,6 +1324,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: Optional): SymbolGlyphAttribute; @@ -1262,6 +1346,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): SymbolGlyphAttribute; diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index 0b608df9b788f09b288528d740a3b94c946c3b78..7b3c57cfeaab6808bf748a4051f54d799818e16c 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -18,6 +18,15 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod } from './common'; +import { CustomBuilder } from './builder' +import { TextHeightAdaptivePolicy, TextOverflow, VerticalAlign } from './enums'; +import { Dimension, Font, Length, LocalizedPadding, Padding, Resource, ResourceColor, ResourceStr, VoidCallback } from './units'; +import { ComponentContent } from '../ComponentContent' +import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; +/*** endif */ + /** * Enum for the mode of the tab bar when selected. * @@ -33,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SelectedMode { /** @@ -49,7 +59,8 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INDICATOR, @@ -66,7 +77,8 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BOARD } @@ -86,7 +98,8 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutMode { @@ -103,7 +116,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, /** @@ -119,7 +133,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VERTICAL = 1, @@ -136,7 +151,8 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HORIZONTAL = 2 } @@ -268,6 +284,77 @@ interface IndicatorStyle { marginTop?: Length; } +/** + * Provide an interface for the style of an SubTabBar indicator including color, height, width, border radius + * and margin top + * + * @interface SubTabBarIndicatorStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface SubTabBarIndicatorStyle { + /** + * Define the color of the indicator + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + color?: ResourceColor; + + /** + * Define the height of the indicator + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + height?: Length; + + /** + * Define the width of the indicator. + * If it is 0, the width will be equal to the width of the content + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + width?: Length; + + /** + * Define the border radius of the indicator + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + borderRadius?: Length; + + /** + * Define the margin top of the indicator + * + * @type { ?Length } + * @default 8 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + marginTop?: Length; +} + /** * Provide an interface for the style of an indicator including border radius * @@ -283,7 +370,8 @@ interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BoardStyle { /** @@ -298,10 +386,12 @@ interface BoardStyle { * Define the border radius of the board * * @type { ?Length } + * @default 8.0vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ borderRadius?: Length; } @@ -376,6 +466,7 @@ declare interface LabelStyle { * Minimum font size of the label text. * * @type { ?(number | ResourceStr) } + * @default 0.0fp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -395,6 +486,7 @@ declare interface LabelStyle { * Maximum font size of the label text. * * @type { ?(number | ResourceStr) } + * @default 0.0fp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -434,6 +526,8 @@ declare interface LabelStyle { * Font of the label text. * * @type { ?Font } + * When setting the tabBar to BottomTabBarStyle, the default font size is 10.0fp. + * When setting the tabBar to SubTabBarStyle, the default font size is 16.0fp. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -466,6 +560,115 @@ declare interface LabelStyle { unselectedColor?: ResourceColor; } +/** + * TabBarLabelStyle object. + * + * @interface TabBarLabelStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface TabBarLabelStyle { + + /** + * overflow mode. + * + * @type { ?TextOverflow } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + overflow?: TextOverflow; + + /** + * Label max lines. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + maxLines?: number; + + /** + * Min font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + minFontSize?: number | ResourceStr; + + /** + * Max font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + maxFontSize?: number | ResourceStr; + + /** + * Adapt text height option. + * + * @type { ?TextHeightAdaptivePolicy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + heightAdaptivePolicy?: TextHeightAdaptivePolicy; + + /** + * Font style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + font?: Font; + + /** + * The text color of the selected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selectedColor?: ResourceColor; + + /** + * The text color of the unselected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + unselectedColor?: ResourceColor; +} + /** * TabBarIconStyle object. * @@ -473,17 +676,20 @@ declare interface LabelStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabBarIconStyle { /** * The icon color of the selected tab bar. * * @type { ?ResourceColor } + * @default #FF007DFF * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor?: ResourceColor; @@ -491,10 +697,12 @@ declare interface TabBarIconStyle { * The icon color of the unselected tab bar. * * @type { ?ResourceColor } + * @default #33182431 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor?: ResourceColor; } @@ -513,6 +721,7 @@ declare interface TabBarIconStyle { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare class TabBarSymbol { /** @@ -533,6 +742,7 @@ declare class TabBarSymbol { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ normal: SymbolGlyphModifier; @@ -554,6 +764,7 @@ declare class TabBarSymbol { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ selected?: SymbolGlyphModifier; } @@ -565,7 +776,8 @@ declare class TabBarSymbol { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabBarOptions { /** @@ -605,7 +817,8 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: string | Resource; @@ -641,7 +854,8 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ text?: string | Resource } @@ -665,7 +879,8 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SubTabBarStyle { /** @@ -690,7 +905,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(content: ResourceStr); /** @@ -700,7 +916,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(content: ResourceStr | ComponentContent); @@ -723,7 +940,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static of(content: ResourceStr): SubTabBarStyle; /** @@ -735,7 +953,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(content: ResourceStr | ComponentContent): SubTabBarStyle; @@ -760,6 +979,18 @@ declare class SubTabBarStyle { */ indicator(value: IndicatorStyle): SubTabBarStyle; + /** + * Set the style of the indicator when selected + * + * @param { SubTabBarIndicatorStyle } style - indicates the indicator style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + indicator(style: SubTabBarIndicatorStyle): SubTabBarStyle; + /** * Set the mode of the indicator when selected * @@ -781,7 +1012,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedMode(value: SelectedMode): SubTabBarStyle; @@ -806,7 +1038,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ board(value: BoardStyle): SubTabBarStyle; @@ -831,6 +1064,18 @@ declare class SubTabBarStyle { */ labelStyle(value: LabelStyle): SubTabBarStyle; + /** + * Set the label style of the sub tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + labelStyle(style: TabBarLabelStyle): SubTabBarStyle; + /** * Set the padding of the sub tab bar * @@ -848,12 +1093,14 @@ declare class SubTabBarStyle { *
When the parameter is of the Dimension type, the value applies to all sides. *

* - * @param { Padding | Dimension } value - indicates the padding of the sub tab bar + * @param { Padding | Dimension } value - indicates the padding of the sub tab bar, default value: + * left: 8.0vp, right: 8.0vp, top: 17.0vp, bottom: 18.0vp. * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension): SubTabBarStyle; @@ -864,12 +1111,15 @@ declare class SubTabBarStyle { *
This API supports mirroring but does not support percentage-based settings. *

* - * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar + * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar, default value: + * start: LengthMetircs.vp(8), end: LengthMetircs.vp(8), + * top: LengthMetircs.vp(17), bottom: LengthMetircs.vp(18). * @returns { SubTabBarStyle } the style of the sub tab bar * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(padding: LocalizedPadding): SubTabBarStyle; @@ -890,7 +1140,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): SubTabBarStyle; } @@ -914,7 +1165,8 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BottomTabBarStyle { /** @@ -952,7 +1204,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); @@ -989,7 +1242,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; @@ -1014,6 +1268,18 @@ declare class BottomTabBarStyle { */ labelStyle(value: LabelStyle): BottomTabBarStyle; + /** + * Set the label style of the bottom tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the bottom tab bar + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + labelStyle(style: TabBarLabelStyle): BottomTabBarStyle; + /** * Set the padding of the bottom tab bar * @@ -1047,7 +1313,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; @@ -1069,7 +1336,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ layoutMode(value: LayoutMode): BottomTabBarStyle; @@ -1091,7 +1359,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ verticalAlign(value: VerticalAlign): BottomTabBarStyle; @@ -1117,7 +1386,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ symmetricExtensible(value: boolean): BottomTabBarStyle; @@ -1138,7 +1408,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id(value: string): BottomTabBarStyle; @@ -1150,7 +1421,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconStyle(style: TabBarIconStyle): BottomTabBarStyle; } @@ -1177,7 +1449,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TabContentInterface { /** @@ -1202,7 +1475,8 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): TabContentAttribute; } @@ -1229,7 +1503,8 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabContentAttribute extends CommonMethod { /** @@ -1334,7 +1609,8 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions): TabContentAttribute; @@ -1348,7 +1624,8 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillShow(event: VoidCallback): TabContentAttribute; @@ -1361,7 +1638,8 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillHide(event: VoidCallback): TabContentAttribute; } diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index ed4700810d14fb40e538bc76fbb66768c8405947..60e64558c1357d09527a3de957279db8bf5dfd17 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle } from './common'; +import { EdgeEffect, PageFlipMode } from './enums'; +import { Dimension, Length, ResourceColor } from './units'; +import { CommonModifier } from "../CommonModifier"; +/*** endif */ + /** * CommonModifier * @@ -51,7 +58,8 @@ declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarMode { /** @@ -75,7 +83,8 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Scrollable = 0, @@ -99,7 +108,8 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Fixed = 1, } @@ -111,7 +121,8 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AnimationMode { /** @@ -120,7 +131,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_FIRST = 0, @@ -130,7 +142,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_FIRST = 1, @@ -140,7 +153,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NO_ANIMATION = 2, @@ -151,7 +165,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_FIRST_WITH_JUMP = 3, @@ -162,7 +177,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_FIRST_WITH_JUMP = 4, } @@ -189,7 +205,8 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BarPosition { /** @@ -211,7 +228,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Start, @@ -234,7 +252,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ End, } @@ -254,7 +273,8 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LayoutStyle { /** @@ -271,7 +291,8 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_CENTER = 0, /** @@ -288,7 +309,8 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_AVERAGE_SPLIT = 1, /** @@ -308,7 +330,8 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPACE_BETWEEN_OR_CENTER = 2 } @@ -320,7 +343,8 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TabsCacheMode { /** @@ -329,7 +353,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CACHE_BOTH_SIDE = 0, @@ -339,7 +364,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CACHE_LATEST_SWITCHED = 1 } @@ -363,7 +389,8 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabsController { /** @@ -385,7 +412,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -412,14 +440,15 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ changeIndex(value: number): void; /** * Called when need to preload specified tab content. * - * @param { Optional> } indices - Indices of tab content to be preloaded. + * @param { Optional> } indices - Indices of tab content to be preloaded, default to an empty array. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter invalid. Possible causes: *
1. The parameter type is not Array. @@ -428,7 +457,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preloadItems(indices: Optional>): Promise; @@ -439,18 +469,20 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setTabBarTranslate(translate: TranslateOptions): void; /** * Set tab bar opacity. * - * @param { number } opacity - opacity + * @param { number } opacity - opacity, default to 1.0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setTabBarOpacity(opacity: number): void; } @@ -462,7 +494,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabsOptions { /** @@ -484,10 +517,12 @@ declare interface TabsOptions { * Set the tab location for Tabs. * * @type { ?BarPosition } + * @default BarPosition.Start * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barPosition?: BarPosition; @@ -510,10 +545,12 @@ declare interface TabsOptions { * Set the index of the currently displayed tab. * * @type { ?number } + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index?: number; @@ -539,7 +576,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TabsController @@ -550,7 +588,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ barModifier?: CommonModifier } @@ -577,7 +616,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TabsInterface { /** @@ -615,7 +655,8 @@ interface TabsInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TabsOptions): TabsAttribute; } @@ -739,7 +780,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabsAnimationEvent { /** @@ -759,7 +801,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ currentOffset: number; @@ -780,7 +823,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ targetOffset: number; @@ -801,7 +845,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ velocity: number; } @@ -821,7 +866,8 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface BarGridColumnOptions { /** @@ -841,7 +887,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ sm?: number; @@ -862,7 +909,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ md?: number; @@ -883,7 +931,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ lg?: number; @@ -903,7 +952,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension; @@ -923,7 +973,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ gutter?: Dimension; } @@ -943,7 +994,8 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScrollableBarModeOptions { /** @@ -962,7 +1014,8 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Dimension; @@ -982,7 +1035,8 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ nonScrollableLayoutStyle?: LayoutStyle; } @@ -997,7 +1051,8 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, extraInfo: TabsAnimationEvent) => void; @@ -1010,7 +1065,8 @@ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1023,7 +1079,8 @@ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1037,7 +1094,8 @@ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; @@ -1053,7 +1111,8 @@ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; @@ -1079,7 +1138,8 @@ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingInde * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TabsAttribute extends CommonMethod { /** @@ -1107,7 +1167,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ vertical(value: boolean): TabsAttribute; @@ -1136,7 +1197,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barPosition(value: BarPosition): TabsAttribute; @@ -1165,7 +1227,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scrollable(value: boolean): TabsAttribute; @@ -1245,7 +1308,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barMode(value: BarMode, options?: ScrollableBarModeOptions): TabsAttribute; @@ -1287,7 +1351,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barWidth(value: Length): TabsAttribute; @@ -1329,7 +1394,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barHeight(value: Length): TabsAttribute; @@ -1377,7 +1443,9 @@ declare class TabsAttribute extends CommonMethod { /** * Called when the animation duration of the bar graph is set. * - * @param { number } value + * @param { number } value - default value: + * When this property is not set or set to null, the default value is 0. + * When set to a value less than 0 or undefined, the default value is 300. * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1387,12 +1455,15 @@ declare class TabsAttribute extends CommonMethod { * Sets the length of time required to complete the tab switching animation, * which is initiated by clicking a specific tab or by calling the changeIndex API of TabsController. * - * @param { number } value + * @param { number } value - default value: + * When this property is not set or set to null, the default value is 0. + * When set to a value less than 0 or undefined, the default value is 300. * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ animationDuration(value: number): TabsAttribute; @@ -1406,7 +1477,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ animationMode(mode: Optional): TabsAttribute; @@ -1419,7 +1491,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ edgeEffect(edgeEffect: Optional): TabsAttribute; @@ -1467,7 +1540,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(event: Callback): TabsAttribute; @@ -1479,7 +1553,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSelected(event: Callback): TabsAttribute; @@ -1511,7 +1586,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onTabBarClick(event: Callback): TabsAttribute; @@ -1523,7 +1599,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUnselected(event: Callback): TabsAttribute; @@ -1561,7 +1638,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationStart(handler: OnTabsAnimationStartCallback): TabsAttribute; @@ -1597,7 +1675,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationEnd(handler: OnTabsAnimationEndCallback): TabsAttribute; @@ -1633,7 +1712,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onGestureSwipe(handler: OnTabsGestureSwipeCallback): TabsAttribute; @@ -1660,7 +1740,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fadingEdge(value: boolean): TabsAttribute; @@ -1681,7 +1762,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: DividerStyle | null): TabsAttribute; @@ -1701,7 +1783,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barOverlap(value: boolean): TabsAttribute; @@ -1722,7 +1805,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundColor(value: ResourceColor): TabsAttribute; @@ -1747,7 +1831,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barGridAlign(value: BarGridColumnOptions): TabsAttribute; @@ -1805,7 +1890,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ customContentTransition(delegate: TabsCustomContentTransitionCallback): TabsAttribute; @@ -1817,7 +1903,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; @@ -1829,7 +1916,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ pageFlipMode(mode: Optional): TabsAttribute; @@ -1842,7 +1930,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundBlurStyle(style: BlurStyle, options: BackgroundBlurStyleOptions): TabsAttribute; @@ -1854,7 +1943,8 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ barBackgroundEffect(options: BackgroundEffectOptions): TabsAttribute; @@ -1891,20 +1981,22 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onContentWillChange(handler: OnTabsContentWillChangeCallback): TabsAttribute; /** * Sets the maximum number of child components to be cached. * - * @param { number } count - the maximum number of child components to be cached. - * @param { TabsCacheMode } mode - the mode of caching child components. + * @param { number } count - the maximum number of child components to be cached, value range: [0, +∞) + * @param { TabsCacheMode } mode - the mode of caching child components, default to TabsCacheMode.CACHE_BOTH_SIDE. * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; } @@ -1926,7 +2018,8 @@ declare class TabsAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabContentAnimatedTransition { /** @@ -1950,7 +2043,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ timeout?: number; @@ -1982,7 +2076,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ transition: Callback; } @@ -2004,7 +2099,8 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TabContentTransitionProxy { /** @@ -2024,7 +2120,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: number; @@ -2045,7 +2142,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: number; @@ -2064,7 +2162,8 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ finishTransition(): void; } diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index e2995382db2c7629845a63c0fbf9e83fe9c01316..7f498aaccebcbe7bd88b3a2158b2a49fd1d0e737 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -18,6 +18,16 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod, ShadowOptions,Optional,Callback} from "./common"; +import { CustomBuilder } from './builder' +import { EllipsisMode, TextCase, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, CopyOptions, TextHeightAdaptivePolicy, TextSelectableMode} from './enums'; +import { Resource, ResourceColor, Font, Length, LengthMetrics } from './units'; +import { TextDataDetectorConfig, LayoutManager, FontSettingOptions, EditMenuOptions } from "./textCommon"; +import { DecorationStyleInterface, StyledString } from "./styledString"; +import { SelectionMenuOptions } from './richEditor' +/*** endif */ + /** * Text overflow options. * @@ -27,7 +37,8 @@ * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextOverflowOptions { /** @@ -74,7 +85,8 @@ declare interface TextOverflowOptions { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ overflow: TextOverflow; } @@ -111,7 +123,8 @@ declare interface TextOverflowOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface TextInterface { /** @@ -154,7 +167,8 @@ interface TextInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (content?: string | Resource, value?: TextOptions): TextAttribute; } @@ -183,7 +197,8 @@ interface TextInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAttribute extends CommonMethod { /** @@ -221,7 +236,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ font(fontValue: Font, options?: FontSettingOptions): TextAttribute; @@ -261,7 +277,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextAttribute; @@ -305,7 +322,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): TextAttribute; @@ -357,7 +375,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextAttribute; @@ -409,7 +428,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextAttribute; @@ -445,6 +465,7 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: number | Resource): TextAttribute; @@ -478,6 +499,7 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: number | Resource): TextAttribute; @@ -517,7 +539,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextAttribute; @@ -580,6 +603,21 @@ declare class TextAttribute extends CommonMethod { * @since 20 */ fontWeight(value: number | FontWeight | ResourceStr): TextAttribute; + + /** + * Called when the font weight is set. + * + * @param { number | FontWeight | string } weight + * @param { FontSettingOptions } options - font setting options. + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @arkts 1.2 + * @since 20 + */ + fontWeight(weight: number | FontWeight | string, options?: FontSettingOptions): TextAttribute; /** * Called when the font weight is set. @@ -602,7 +640,7 @@ declare class TextAttribute extends CommonMethod { * @atomicservice * @since 12 */ - /** + /** * Called when the font weight is set. * * @param { number | FontWeight | ResourceStr } weight @@ -628,7 +666,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineSpacing(value: LengthMetrics): TextAttribute; @@ -693,7 +732,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextAttribute; @@ -709,6 +749,19 @@ declare class TextAttribute extends CommonMethod { */ textVerticalAlign(textVerticalAlign: Optional): TextAttribute; + + /** + * Set the vertical align of the whole text content. + * + * @param { Optional } textContentAlign - The default value is TOP. + * @returns { TextAttribute } returns the instance of the TextAttribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 21 + */ + textContentAlign(textContentAlign: Optional): TextAttribute; + /** * Called when the vertical center mode of the font is set. * @@ -751,7 +804,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextAttribute; @@ -819,7 +873,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(options: TextOverflowOptions): TextAttribute; @@ -865,7 +920,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: string | Resource): TextAttribute; @@ -911,7 +967,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextAttribute; @@ -966,7 +1023,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: DecorationStyleInterface): TextAttribute; @@ -1027,6 +1085,20 @@ declare class TextAttribute extends CommonMethod { * @since 20 */ letterSpacing(value: number | ResourceStr): TextAttribute; + + /** + * Called when the distance between text fonts is set. + * + * @param { number | string } value + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + letterSpacing(value: number | string): TextAttribute; /** * Called when the type of letter in the text font is set. @@ -1064,7 +1136,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textCase(value: TextCase): TextAttribute; @@ -1123,6 +1196,20 @@ declare class TextAttribute extends CommonMethod { * @since 20 */ baselineOffset(value: number | ResourceStr): TextAttribute; + + /** + * Called when the baseline offset is set. + * + * @param { number | string } value + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + baselineOffset(value: number | string): TextAttribute; /** * Allow replication. @@ -1158,7 +1245,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextAttribute; @@ -1194,7 +1282,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ draggable(value: boolean): TextAttribute; @@ -1221,7 +1310,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextAttribute; @@ -1262,7 +1352,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAttribute; @@ -1283,7 +1374,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Length): TextAttribute; @@ -1300,7 +1392,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextAttribute; @@ -1317,7 +1410,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAttribute; @@ -1330,7 +1424,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: (value: string) => void): TextAttribute; @@ -1355,7 +1450,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selection(selectionStart: number, selectionEnd: number): TextAttribute; @@ -1367,7 +1463,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(color: ResourceColor): TextAttribute; @@ -1379,7 +1476,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(color: ResourceColor): TextAttribute; @@ -1418,7 +1516,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(value: EllipsisMode): TextAttribute; @@ -1459,7 +1558,8 @@ declare class TextAttribute extends CommonMethod { * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enableDataDetector(enable: boolean): TextAttribute; @@ -1490,7 +1590,8 @@ declare class TextAttribute extends CommonMethod { * @returns { TextAttribute } The attribute of the text. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ dataDetectorConfig(config: TextDataDetectorConfig): TextAttribute; @@ -1524,7 +1625,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(spanType: TextSpanType, content: CustomBuilder, responseType: TextResponseType, options?: SelectionMenuOptions): TextAttribute; @@ -1546,7 +1648,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAttribute; @@ -1563,7 +1666,8 @@ declare class TextAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextAttribute; @@ -1575,7 +1679,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ marqueeOptions(options: Optional): TextAttribute; @@ -1587,7 +1692,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onMarqueeStateChange(callback: Callback): TextAttribute; @@ -1605,7 +1711,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ privacySensitive(supported: boolean): TextAttribute; @@ -1617,7 +1724,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ textSelectable(mode: TextSelectableMode): TextAttribute; @@ -1631,7 +1739,8 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): TextAttribute; @@ -1648,22 +1757,11 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: boolean): TextAttribute; - /** - * Set to remove trailing spaces from text. - * - * @param { Optional } trim - * @returns { TextAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - trimSpace(trim: Optional): TextAttribute; - /** * Enable or disable haptic feedback. * @@ -1672,15 +1770,16 @@ declare class TextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextAttribute; /** * Set whether to optimize the trailing spaces at the end of each line during text layout. * - * @param { Optional } optimize - * @returns { TextAttribute } + * @param { Optional } optimize - Default value is false, set true to optimize the trailing spaces at the end of each line. + * @returns { TextAttribute } returns the instance of the TextAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1802,7 +1901,8 @@ declare const Text: TextInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextSpanType { /** @@ -1818,7 +1918,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 0, @@ -1835,7 +1936,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -1852,7 +1954,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MIXED = 2, @@ -1864,7 +1967,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -1895,7 +1999,8 @@ declare enum TextSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextResponseType { /** @@ -1911,7 +2016,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT_CLICK = 0, @@ -1928,7 +2034,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1, @@ -1945,7 +2052,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SELECT = 2, @@ -1957,7 +2065,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 3, } @@ -1969,7 +2078,8 @@ declare enum TextResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeState { /** @@ -1978,7 +2088,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ START = 0, @@ -1988,7 +2099,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ BOUNCE = 1, @@ -1998,7 +2110,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ FINISH = 2, } @@ -2010,7 +2123,8 @@ declare enum MarqueeState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MarqueeStartPolicy { /** @@ -2019,7 +2133,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -2029,7 +2144,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_FOCUS = 1, } @@ -2049,7 +2165,8 @@ declare enum MarqueeStartPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextOptions { /** @@ -2067,7 +2184,8 @@ declare interface TextOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controller: TextController; } @@ -2079,7 +2197,8 @@ declare interface TextOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMarqueeOptions { /** @@ -2089,7 +2208,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ start: boolean; @@ -2100,7 +2220,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ step?: number; @@ -2111,7 +2232,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ loop?: number; @@ -2122,7 +2244,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ fromStart?: boolean; @@ -2133,7 +2256,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ delay?: number; @@ -2144,7 +2268,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ fadeout?: boolean; @@ -2155,7 +2280,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ marqueeStartPolicy?: MarqueeStartPolicy; } @@ -2173,7 +2299,8 @@ declare interface TextMarqueeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextController { /** @@ -2189,7 +2316,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -2204,7 +2332,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(value: StyledString): void; @@ -2215,7 +2344,8 @@ declare class TextController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; } diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 90fefc9c455cec56d33fbc3dd410d2e399c6a06e..5367dcb957f4d052d85780bf7b5f47e1330e7e7a 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -18,6 +18,20 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { KeyboardOptions, PasteEvent } from './richEditor'; +import { CaretStyle, DeleteValue, EditMenuOptions, EditableTextOnChangeCallback, InsertValue, + AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from './textCommon'; +import { BarState, CopyOptions, FontStyle, FontWeight, LineBreakStrategy, TextContentStyle, TextAlign, TextOverflow, + TextHeightAdaptivePolicy, WordBreak, EllipsisMode } from './enums'; +import { EnterKeyType, SubmitEvent, ContentType } from './textInput'; +import { Dimension, Font, Length, LengthMetrics, ResourceColor, ResourceStr } from './units'; +import { InputCounterOptions, TextContentControllerBase, SelectionOptions, + TextDecorationOptions, CommonMethod, Callback, Optional, Bindable } from './common'; +import { CustomBuilder } from './builder'; +import { Resource } from '../../global/resource'; +/*** endif */ + /** * Provides the method of switching the cursor position. * @@ -39,7 +53,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAreaController extends TextContentControllerBase { /** @@ -62,7 +77,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -88,7 +104,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): void; @@ -132,7 +149,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -149,7 +167,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; } @@ -176,7 +195,8 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextAreaOptions { /** @@ -207,7 +227,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ResourceStr; @@ -242,6 +263,18 @@ declare interface TextAreaOptions { */ text?: ResourceStr; + /** + * Sets the current value of TextArea. + * + * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + text?: ResourceStr | Bindable | Bindable | Bindable; + /** * Called when the position of the insertion cursor is set. * @@ -264,7 +297,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: TextAreaController; } @@ -291,7 +325,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextAreaInterface { /** @@ -319,7 +354,8 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value?: TextAreaOptions): TextAreaAttribute; } @@ -339,7 +375,8 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextAreaType { /** @@ -355,7 +392,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -372,7 +410,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER = 2, @@ -390,7 +429,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 3, @@ -408,7 +448,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 5, @@ -418,7 +459,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_DECIMAL = 12, @@ -428,7 +470,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 13, @@ -452,7 +495,8 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; @@ -478,7 +522,8 @@ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: Submi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextAreaAttribute extends CommonMethod { /** @@ -506,7 +551,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): TextAreaAttribute; @@ -536,7 +582,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value: Font): TextAreaAttribute; @@ -557,7 +604,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): TextAreaAttribute; @@ -597,7 +645,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextAreaAttribute; @@ -630,7 +679,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): TextAreaAttribute; @@ -659,7 +709,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextAreaAttribute; @@ -690,7 +741,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextAreaAttribute; @@ -719,7 +771,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextAreaAttribute; @@ -767,6 +820,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextAreaAttribute; @@ -800,7 +854,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextAreaAttribute; @@ -821,7 +876,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(value: TextOverflow): TextAreaAttribute; @@ -833,7 +889,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): TextAreaAttribute; @@ -871,7 +928,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; @@ -883,7 +941,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): TextAreaAttribute; @@ -896,7 +955,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; @@ -933,6 +993,18 @@ declare class TextAreaAttribute extends CommonMethod { * @since 14 */ onSubmit(callback: TextAreaSubmitCallback): TextAreaAttribute; + /** + * Called when submitted. + * + * @param { ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback } callback - callback of the listened event. + * @returns { TextAreaAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onSubmit(callback: ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback): TextAreaAttribute; /** * Called when the input changes. @@ -975,7 +1047,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): TextAreaAttribute; @@ -997,7 +1070,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; @@ -1020,7 +1094,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; @@ -1044,7 +1119,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; @@ -1073,7 +1149,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: (value: string) => void): TextAreaAttribute; @@ -1102,7 +1179,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: (value: string) => void): TextAreaAttribute; @@ -1134,7 +1212,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: (value: string, event: PasteEvent) => void): TextAreaAttribute; @@ -1169,7 +1248,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextAreaAttribute; @@ -1190,7 +1270,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): TextAreaAttribute; @@ -1216,7 +1297,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(value: number): TextAreaAttribute; @@ -1255,7 +1337,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; @@ -1279,7 +1362,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style(value: TextContentStyle): TextAreaAttribute; @@ -1298,7 +1382,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barState(value: BarState): TextAreaAttribute; @@ -1328,7 +1413,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): TextAreaAttribute; @@ -1346,7 +1432,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1364,7 +1451,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1402,6 +1490,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextAreaAttribute; @@ -1435,6 +1524,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextAreaAttribute; @@ -1465,7 +1555,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAreaAttribute; @@ -1497,7 +1588,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextAreaAttribute; @@ -1540,7 +1632,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextAreaAttribute; @@ -1556,7 +1649,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAreaAttribute; @@ -1601,7 +1695,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; @@ -1613,7 +1708,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): TextAreaAttribute; @@ -1632,7 +1728,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): TextAreaAttribute; @@ -1648,7 +1745,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineSpacing(value: LengthMetrics): TextAreaAttribute; @@ -1678,7 +1776,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextAreaAttribute; @@ -1699,7 +1798,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: TextAreaType): TextAreaAttribute; @@ -1710,7 +1810,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoFill(value: boolean): TextAreaAttribute; @@ -1721,7 +1822,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentType(contentType: ContentType): TextAreaAttribute; @@ -1737,7 +1839,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextAreaAttribute; @@ -1755,7 +1858,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): TextAreaAttribute; @@ -1771,7 +1875,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): TextAreaAttribute; @@ -1789,7 +1894,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): TextAreaAttribute; @@ -1805,7 +1911,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): TextAreaAttribute; @@ -1819,7 +1926,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): TextAreaAttribute; @@ -1836,7 +1944,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): TextAreaAttribute; @@ -1860,7 +1969,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextAreaAttribute; @@ -1873,6 +1983,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextAreaAttribute; @@ -1884,10 +1995,11 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): TextAreaAttribute; - + /** * Set the ellipsis mode. * @@ -1902,7 +2014,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(mode: Optional): TextAreaAttribute; @@ -1913,7 +2026,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): TextAreaAttribute; @@ -1930,7 +2044,8 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): TextAreaAttribute; @@ -1941,7 +2056,8 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): TextAreaAttribute; diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 72059f918df764eb406996d59906dcddcb51ccc3..be89b4eabdeaae07c04383f933d4632163a45882 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration, CommonMethod, ShadowOptions, ContentModifier, Optional, DateTimeOptions } from './common' +import { ResourceColor, Length, ResourceStr } from './units' +import { FontStyle, FontWeight } from './enums' +/*** endif */ + /** * Provides a way to control the textclock status. * @@ -38,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextClockController { /** @@ -61,7 +68,8 @@ declare class TextClockController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** @@ -87,6 +95,17 @@ declare class TextClockController { * @since 11 */ start(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start(): void; /** * Provides a stop event for textclock. * @@ -110,6 +129,17 @@ declare class TextClockController { * @since 11 */ stop(); + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stop(): void; } /** @@ -120,7 +150,8 @@ declare class TextClockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextClockConfiguration extends CommonConfiguration { /** @@ -132,7 +163,8 @@ declare interface TextClockConfiguration extends CommonConfiguration { /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * set display time format,such as "yyyy/MM/dd","yyyy-MM-dd". + * support time format:yyyy,MM,MMM(English month abbreviation),MMMM(Full name of the month in English), * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * HH/hh(24-hour clock/12-hour clock),mm(minute),ss(second). * * @param { string } value * @returns { TextClockAttribute } @@ -366,10 +406,10 @@ declare class TextClockAttribute extends CommonMethod { * @since 8 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * set display time format,such as "yyyy/MM/dd","yyyy-MM-dd". + * support time format:yyyy,MM,MMM(English month abbreviation),MMMM(Full name of the month in English), * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * HH/hh(24-hour clock/12-hour clock),mm(minute),ss(second). * * @param { string } value * @returns { TextClockAttribute } @@ -378,10 +418,10 @@ declare class TextClockAttribute extends CommonMethod { * @since 10 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * set display time format,such as "yyyy/MM/dd","yyyy-MM-dd". + * support time format:yyyy,MM,MMM(English month abbreviation),MMMM(Full name of the month in English), * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * HH/hh(24-hour clock/12-hour clock),mm(minute),ss(second). * The default value is "hh:mm:ss" when TextClock is not in a form. * The default value is "hh:mm" when TextClock is in a form. * If the value has second or millisecond, the value will be set to the default value. @@ -395,10 +435,10 @@ declare class TextClockAttribute extends CommonMethod { * @since 11 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * set display time format,such as "yyyy/MM/dd","yyyy-MM-dd". + * support time format:yyyy,MM,MMM(English month abbreviation),MMMM(Full name of the month in English), * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * HH/hh(24-hour clock/12-hour clock),mm(minute),ss(second). * The default value is "hh:mm:ss" when TextClock is not in a form. * The default value is "hh:mm" when TextClock is in a form. * If the value has second or millisecond, the value will be set to the default value. @@ -456,7 +496,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onDateChange(event: (value: number) => void): TextClockAttribute; @@ -486,7 +527,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextClockAttribute; @@ -516,7 +558,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextClockAttribute; @@ -546,7 +589,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextClockAttribute; @@ -576,7 +620,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): TextClockAttribute; @@ -606,7 +651,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextClockAttribute; @@ -629,7 +675,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextClockAttribute; @@ -658,7 +705,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextClockAttribute; @@ -670,7 +718,8 @@ declare class TextClockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): TextClockAttribute; @@ -683,7 +732,8 @@ declare class TextClockAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; } diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 4f75e5b57c836c9c5d7f38065ec50c5071632a86..2f6b2461aee2a831d85a6da5e056dc9fe22c4250 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, ResourceStr, Length } from './units'; +import { DecorationStyleInterface, MutableStyledString, StyledString } from './styled_string'; +import { SelectionOptions, Callback } from './common'; +import { TextDecorationType, TextDecorationStyle } from './enums'; +/*** endif */ + /** * Defines the text data detector type. * @@ -31,7 +38,8 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDataDetectorType { /** @@ -45,7 +53,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE_NUMBER = 0, @@ -60,7 +69,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 1, @@ -75,7 +85,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 2, @@ -90,7 +101,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ADDRESS = 3, @@ -99,7 +111,8 @@ declare enum TextDataDetectorType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_TIME = 4, } @@ -117,7 +130,8 @@ declare enum TextDataDetectorType { * @interface TextDataDetectorConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextDataDetectorConfig { /** @@ -133,7 +147,8 @@ declare interface TextDataDetectorConfig { * @type { TextDataDetectorType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ types: TextDataDetectorType[] @@ -147,20 +162,21 @@ declare interface TextDataDetectorConfig { /** * Text data detect result callback. * - * @type { ?function } + * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - onDetectResultUpdate?: (result: string) => void - + onDetectResultUpdate?: Callback /** * The color of AI entity. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor, @@ -170,7 +186,8 @@ declare interface TextDataDetectorConfig { * @type { ?DecorationStyleInterface } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration?: DecorationStyleInterface; @@ -192,7 +209,8 @@ declare interface TextDataDetectorConfig { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextRange { /** @@ -203,7 +221,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: number; @@ -215,7 +234,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: number; } @@ -227,7 +247,8 @@ declare interface TextRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface InsertValue { /** @@ -237,7 +258,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertOffset: number; @@ -248,7 +270,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ insertValue: string; } @@ -260,7 +283,8 @@ declare interface InsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TextDeleteDirection { /** @@ -269,7 +293,8 @@ declare enum TextDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKWARD = 0, @@ -279,7 +304,8 @@ declare enum TextDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD = 1, } @@ -332,7 +358,8 @@ declare enum SuperscriptStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MenuType { /** @@ -341,7 +368,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SELECTION_MENU = 0, @@ -351,7 +379,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ PREVIEW_MENU = 1, } @@ -363,7 +392,8 @@ declare enum MenuType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum AutoCapitalizationMode { /** @@ -372,7 +402,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -382,7 +413,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ WORDS = 1, @@ -392,7 +424,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ SENTENCES = 2, @@ -402,7 +435,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_CHARACTERS = 3, } @@ -414,7 +448,8 @@ declare enum AutoCapitalizationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DeleteValue { /** @@ -424,7 +459,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deleteOffset: number; @@ -435,7 +471,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ direction: TextDeleteDirection; @@ -446,7 +483,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deleteValue: string; } @@ -460,7 +498,8 @@ declare interface DeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRange) => void; @@ -473,7 +512,8 @@ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRang * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Callback when input sometimes has info of previewText. @@ -485,7 +525,8 @@ declare type OnDidChangeCallback = (rangeBefore: TextRange, rangeAfter: TextRang * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare type EditableTextOnChangeCallback = (value: string, previewText?: PreviewText, options?: TextChangeOptions) => void; @@ -496,7 +537,8 @@ declare type EditableTextOnChangeCallback = (value: string, previewText?: Previe * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextBaseController { /** @@ -508,7 +550,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -518,7 +561,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ closeSelectionMenu(): void; @@ -529,7 +573,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLayoutManager(): LayoutManager; } @@ -542,7 +587,8 @@ declare interface TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextEditControllerEx extends TextBaseController { /** @@ -552,7 +598,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEditing(): boolean; @@ -562,7 +609,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopEditing(): void; @@ -574,7 +622,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCaretOffset(offset: number): boolean; @@ -585,7 +634,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCaretOffset(): number; @@ -599,6 +649,18 @@ declare interface TextEditControllerEx extends TextBaseController { * @since 12 */ getPreviewText?(): PreviewText; + + /** + * Get PreviewText. + * + * @returns { PreviewText } - Return the PreviewText. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getPreviewText(): PreviewText; } /** @@ -607,7 +669,8 @@ declare interface TextEditControllerEx extends TextBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PreviewText { /** @@ -617,7 +680,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -628,7 +692,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -640,7 +705,8 @@ declare interface PreviewText { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyledStringController { /** @@ -650,7 +716,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setStyledString(styledString: StyledString): void; @@ -661,7 +728,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; } @@ -673,7 +741,8 @@ declare interface StyledStringController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface StyledStringChangedListener { /** @@ -683,7 +752,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange?: Callback; @@ -694,7 +764,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidChange?: OnDidChangeCallback; } @@ -706,7 +777,8 @@ declare interface StyledStringChangedListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface StyledStringChangeValue { /** @@ -716,7 +788,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ range: TextRange; @@ -727,7 +800,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ replacementString: StyledString; @@ -738,7 +812,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previewText?: StyledString; } @@ -750,7 +825,8 @@ interface StyledStringChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LayoutManager { /** @@ -760,7 +836,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLineCount(): number; @@ -773,7 +850,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity; @@ -810,7 +888,8 @@ declare interface LayoutManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PositionWithAffinity { /** @@ -820,7 +899,8 @@ interface PositionWithAffinity { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position: number; @@ -891,6 +971,16 @@ declare type RectHeightStyle = import('../api/@ohos.graphics.text').default.Rect */ declare type TextBox = import('../api/@ohos.graphics.text').default.TextBox; +/** + * The Paragraph type provide detailed information about a paragraph, + * including properties such as line count, line height and other relevant metrics. + * + * @typedef { import('../api/@ohos.graphics.text').default.Paragraph } Paragraph + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare type Paragraph = import('../api/@ohos.graphics.text').default.Paragraph; + /** * Defines the cursor style * @@ -906,7 +996,8 @@ declare type TextBox = import('../api/@ohos.graphics.text').default.TextBox; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface CaretStyle { /** @@ -924,7 +1015,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length, @@ -943,7 +1035,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor, } @@ -954,7 +1047,8 @@ interface CaretStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextMenuItemId { /** @@ -966,10 +1060,11 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static of(id: ResourceStr): TextMenuItemId; - + /** * Judge if two TextMenuItemId are equal. * @@ -978,10 +1073,11 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ equals(id: TextMenuItemId): boolean; - + /** * Indicates the TextMenuItemId to copy and delete the currently selected text. * @@ -990,10 +1086,11 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly CUT: TextMenuItemId; - + /** * Indicates the TextMenuItemId to copy the currently selected text to the clipboard. * @@ -1002,10 +1099,11 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly COPY: TextMenuItemId; - + /** * Indicates the TextMenuItemId to copy the current contents of the clipboard into the text view. * @@ -1014,10 +1112,11 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly PASTE: TextMenuItemId; - + /** * Indicates the TextMenuItemId to select all text in a text view. * @@ -1026,10 +1125,11 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SELECT_ALL: TextMenuItemId; - + /** * Indicates the TextMenuItemId for collaboration service menu items. * @@ -1038,10 +1138,11 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly COLLABORATION_SERVICE: TextMenuItemId; - + /** * Indicates the TextMenuItemId to recognize the text in the picture and input it into the text view. * @@ -1050,7 +1151,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly CAMERA_INPUT: TextMenuItemId; @@ -1062,7 +1164,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly AI_WRITER: TextMenuItemId; @@ -1074,7 +1177,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly TRANSLATE: TextMenuItemId; @@ -1086,7 +1190,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SEARCH: TextMenuItemId; @@ -1098,7 +1203,8 @@ declare class TextMenuItemId { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static readonly SHARE: TextMenuItemId; @@ -1161,8 +1267,22 @@ declare class TextMenuItemId { * @since 20 */ static readonly dateTime: TextMenuItemId; -} + + /** + * Indicates the TextMenuItemId for asking AI. + * + * @type { TextMenuItemId } + * @readonly + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + static readonly askAI: TextMenuItemId; +} + /** * TextMenuItem * @@ -1170,7 +1290,8 @@ declare class TextMenuItemId { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextMenuItem { /** @@ -1180,7 +1301,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ content: ResourceStr; /** @@ -1190,7 +1312,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ icon?: ResourceStr; /** @@ -1200,7 +1323,8 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: TextMenuItemId; /** @@ -1210,11 +1334,12 @@ declare interface TextMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ labelInfo?: ResourceStr; } - + /** * Callback before displaying the menu when the selection range changes. * @@ -1228,6 +1353,35 @@ declare interface TextMenuItem { */ type OnPrepareMenuCallback = (menuItems: Array) => Array; +/** + * Callback function when the selection menu create. + * + * @typedef { function } OnCreateMenuCallback + * @param { Array } menuItems - currently displayed menu items. + * @returns { Array } Return the menu items will displayed after operations. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnCreateMenuCallback = (menuItems: Array) => Array; + +/** + * Invoke upon clicking an item, capable of intercepting the default system menu execution behavior. + * + * @typedef { function } OnMenuItemClickCallback + * @param { TextMenuItem } menuItem - current default menu. + * @param { TextRange } range - current selected range. + * @returns { boolean } - Return True, the event is consumed, false otherwise. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnMenuItemClickCallback = (menuItem: TextMenuItem, range: TextRange) => boolean + /** * EditMenuOptions * @@ -1235,7 +1389,8 @@ type OnPrepareMenuCallback = (menuItems: Array) => Array void; @@ -1401,7 +1493,8 @@ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; @@ -1415,7 +1508,8 @@ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; @@ -1430,7 +1524,8 @@ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: numb * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; @@ -1456,7 +1551,8 @@ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextInputAttribute extends CommonMethod { /** @@ -1484,7 +1580,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type(value: InputType): TextInputAttribute; @@ -1495,7 +1592,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentType(value: ContentType): TextInputAttribute; @@ -1524,7 +1622,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderColor(value: ResourceColor): TextInputAttribute; @@ -1549,7 +1648,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textOverflow(value: TextOverflow): TextInputAttribute; @@ -1561,7 +1661,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent(value: Dimension): TextInputAttribute; @@ -1595,7 +1696,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ placeholderFont(value?: Font): TextInputAttribute; @@ -1624,7 +1726,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType(value: EnterKeyType): TextInputAttribute; @@ -1657,7 +1760,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretColor(value: ResourceColor): TextInputAttribute; @@ -1721,7 +1825,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEditChange(callback: Callback): TextInputAttribute; @@ -1761,7 +1866,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSubmit(callback: OnSubmitCallback): TextInputAttribute; @@ -1805,7 +1911,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: EditableTextOnChangeCallback): TextInputAttribute; @@ -1837,7 +1944,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): TextInputAttribute; @@ -1869,7 +1977,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onContentScroll(callback: OnContentScrollCallback): TextInputAttribute; @@ -1903,7 +2012,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLength(value: number): TextInputAttribute; @@ -1932,7 +2042,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextInputAttribute; @@ -1968,7 +2079,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextInputAttribute; @@ -1997,7 +2109,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextInputAttribute; @@ -2046,6 +2159,7 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextInputAttribute; @@ -2080,7 +2194,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextInputAttribute; @@ -2133,7 +2248,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ inputFilter(value: ResourceStr, error?: Callback): TextInputAttribute; @@ -2173,7 +2289,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCopy(callback: Callback): TextInputAttribute; @@ -2213,7 +2330,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onCut(callback: Callback): TextInputAttribute; @@ -2256,7 +2374,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPaste(callback: OnPasteCallback): TextInputAttribute; @@ -2291,7 +2410,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copyOption(value: CopyOptions): TextInputAttribute; @@ -2324,12 +2444,13 @@ declare class TextInputAttribute extends CommonMethod { *
To avoid such issues, use the onSecurityStateChange callback to sync the states. *

* - * @param { boolean } value - Default value is false. + * @param { boolean } value - Default value is true. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showPasswordIcon(value: boolean): TextInputAttribute; @@ -2367,7 +2488,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign(value: TextAlign): TextInputAttribute; @@ -2400,7 +2522,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style(value: TextInputStyle | TextContentStyle): TextInputAttribute; @@ -2421,7 +2544,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretStyle(value: CaretStyle): TextInputAttribute; @@ -2446,7 +2570,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedBackgroundColor(value: ResourceColor): TextInputAttribute; @@ -2467,7 +2592,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ caretPosition(value: number): TextInputAttribute; @@ -2493,7 +2619,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enableKeyboardOnFocus(value: boolean): TextInputAttribute; @@ -2519,7 +2646,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ passwordIcon(value: PasswordIcon): TextInputAttribute; @@ -2557,7 +2685,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showError(value?: ResourceStr | undefined): TextInputAttribute; @@ -2581,7 +2710,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showUnit(value: CustomBuilder): TextInputAttribute; @@ -2606,7 +2736,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showUnderline(value: boolean): TextInputAttribute; @@ -2625,7 +2756,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ underlineColor(value: ResourceColor | UnderlineColor | undefined): TextInputAttribute; @@ -2657,7 +2789,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectionMenuHidden(value: boolean): TextInputAttribute; @@ -2676,7 +2809,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ barState(value: BarState): TextInputAttribute; @@ -2697,7 +2831,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines(value: number): TextInputAttribute; @@ -2716,7 +2851,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak(value: WordBreak): TextInputAttribute; @@ -2734,7 +2870,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineBreakStrategy(strategy: LineBreakStrategy): TextInputAttribute; @@ -2780,7 +2917,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; @@ -2808,7 +2946,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ showCounter(value: boolean, options?: InputCounterOptions): TextInputAttribute; @@ -2865,6 +3004,19 @@ declare class TextInputAttribute extends CommonMethod { */ cancelButton(symbolOptions: CancelButtonSymbolOptions): TextInputAttribute; + /** + * Set the cancel button style + * + * @param { CancelButtonOptions | CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button. + * @returns { TextInputAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + cancelButton(symbolOptions: CancelButtonOptions | CancelButtonSymbolOptions): TextInputAttribute; + /** * Sets selection when on focus. * @@ -2886,7 +3038,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ selectAll(value: boolean): TextInputAttribute; @@ -2906,7 +3059,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize(value: number | string | Resource): TextInputAttribute; @@ -2926,7 +3080,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize(value: number | string | Resource): TextInputAttribute; @@ -2948,6 +3103,7 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextInputAttribute; @@ -2969,6 +3125,7 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextInputAttribute; @@ -2998,7 +3155,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextInputAttribute; @@ -3013,11 +3171,12 @@ declare class TextInputAttribute extends CommonMethod { /** * Sets whether enable auto fill or not. * - * @param { boolean } value - Indicates the flag whether autofill is enabled.Default value is rue.True: enable, false: disable. + * @param { boolean } value - Indicates the flag whether autofill is enabled.Default value is true.true: enable, false: disable. * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoFill(value: boolean): TextInputAttribute; @@ -3033,7 +3192,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration(value: TextDecorationOptions): TextInputAttribute; @@ -3054,7 +3214,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing(value: number | string | Resource): TextInputAttribute; @@ -3072,7 +3233,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight(value: number | string | Resource): TextInputAttribute; @@ -3095,7 +3257,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ passwordRules(value: string): TextInputAttribute; @@ -3116,7 +3279,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeature(value: string): TextInputAttribute; @@ -3137,7 +3301,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ showPassword(visible: boolean): TextInputAttribute; @@ -3149,7 +3314,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onSecurityStateChange(callback: Callback): TextInputAttribute; @@ -3167,7 +3333,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillInsert(callback: Callback): TextInputAttribute; @@ -3183,7 +3350,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidInsert(callback: Callback): TextInputAttribute; @@ -3201,7 +3369,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDelete(callback: Callback): TextInputAttribute; @@ -3217,7 +3386,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDelete(callback: Callback): TextInputAttribute; @@ -3243,7 +3413,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): TextInputAttribute; @@ -3260,7 +3431,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enablePreviewText(enable: boolean): TextInputAttribute; @@ -3272,7 +3444,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(isEnabled: boolean): TextInputAttribute; @@ -3285,6 +3458,7 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextInputAttribute; @@ -3296,7 +3470,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading(halfLeading: Optional): TextInputAttribute; @@ -3308,7 +3483,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode(mode: Optional): TextInputAttribute; @@ -3319,7 +3495,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ stopBackPress(isStopped: Optional): TextInputAttribute; @@ -3331,7 +3508,8 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ onWillChange(callback: Callback): TextInputAttribute; @@ -3342,7 +3520,8 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAppearance(appearance: Optional): TextInputAttribute; diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 7ff3c71a6d42a4caba14433d049db9433b218d9e..3734088ec693891c6d1fae5c031ee8475b9346d4 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource, ResourceColor, Offset, Dimension, ResourceStr } from './units'; +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, Bindable } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity, TextOverflow } from './enums'; +import { LengthMetrics } from './../Graphics'; +/*** endif */ + /** * Define the contents of each selector item. * @@ -33,7 +41,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerRangeContent { /** @@ -53,7 +62,8 @@ declare interface TextPickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ icon: string | Resource; @@ -82,7 +92,8 @@ declare interface TextPickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ text?: string | Resource; } @@ -101,7 +112,8 @@ declare interface TextPickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextCascadePickerRangeContent { /** @@ -126,7 +138,8 @@ declare interface TextCascadePickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ text: string | Resource; @@ -144,7 +157,8 @@ declare interface TextCascadePickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ children?: TextCascadePickerRangeContent[]; } @@ -171,7 +185,8 @@ declare interface TextCascadePickerRangeContent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerOptions { /** @@ -198,7 +213,8 @@ declare interface TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]; @@ -259,6 +275,19 @@ declare interface TextPickerOptions { */ value?: ResourceStr | ResourceStr[]; + /** + * Value of the current selection. + * Only valid when only text is displayed. + * + * @type { ?(ResourceStr | ResourceStr[] | Bindable | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + value?: ResourceStr | ResourceStr[] | Bindable | Bindable; + /** * Index of the default selected item in the array. * The index is zero-based. @@ -295,6 +324,18 @@ declare interface TextPickerOptions { */ selected?: number | number[]; + /** + * Current selected subscript. + * + * @type { ?(number | number[] | Bindable | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: number | number[] | Bindable | Bindable; + /** * Width of each column in the picker. * @@ -306,7 +347,8 @@ declare interface TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ columnWidths?: LengthMetrics[]; } @@ -333,7 +375,8 @@ declare interface TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextPickerInterface { /** @@ -361,7 +404,8 @@ interface TextPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TextPickerOptions): TextPickerAttribute; } @@ -373,7 +417,8 @@ interface TextPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DividerOptions { /** @@ -390,7 +435,8 @@ declare interface DividerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Dimension; @@ -398,11 +444,12 @@ declare interface DividerOptions { * Color of the divider. * * @type { ?ResourceColor } - * @default "#33000000" + * @default '#33000000' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -419,7 +466,8 @@ declare interface DividerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: Dimension; @@ -436,7 +484,8 @@ declare interface DividerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: Dimension; } @@ -449,7 +498,8 @@ declare interface DividerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerTextStyle extends PickerTextStyle { /** @@ -463,7 +513,8 @@ declare interface TextPickerTextStyle extends PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ minFontSize?: number | string | Resource; @@ -474,7 +525,8 @@ declare interface TextPickerTextStyle extends PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ maxFontSize?: number | string | Resource; @@ -489,7 +541,8 @@ declare interface TextPickerTextStyle extends PickerTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ overflow?: TextOverflow; } @@ -536,7 +589,8 @@ declare interface PickerBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; @@ -549,7 +603,8 @@ declare type TextPickerScrollStopCallback = (value: string | string[], index: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; @@ -562,7 +617,8 @@ declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void; @@ -588,7 +644,8 @@ declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], in * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextPickerAttribute extends CommonMethod { /** @@ -612,14 +669,15 @@ declare class TextPickerAttribute extends CommonMethod { * Sets the height of each item in the picker. * * @param { number | string } value - Height of each item in the picker. - *
For the number type, the value range is [0, +∞]. For the string type, - *
only numeric string values, for example, "56", are supported. + *
For the number type, the value range is [0, +∞). + *
For the string type, only numeric string values, for example, "56", are supported. * @returns { TextPickerAttribute } * @default 56 vp (selected) and 36 vp (unselected). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultPickerItemHeight(value: number | string): TextPickerAttribute; @@ -627,14 +685,15 @@ declare class TextPickerAttribute extends CommonMethod { * Sets the height of each item in the picker. * * @param { Optional } height - Height of each item in the picker. - *
For the number type, the value range is [0, +∞]. + *
For the number type, the value range is [0, +∞). *
For the string type, only numeric string values, for example, "56", are supported. * @default 56 vp (selected) and 36 vp (unselected). * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ defaultPickerItemHeight(height: Optional): TextPickerAttribute; @@ -656,7 +715,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ canLoop(value: boolean): TextPickerAttribute; @@ -670,7 +730,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ canLoop(isLoop: Optional): TextPickerAttribute; @@ -691,7 +752,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; @@ -704,10 +766,23 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(style: Optional): TextPickerAttribute; + /** + * Sets the text style of disappearing items + * + * @param { Optional } style - indicates the text style of disappearing items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disappearTextStyle(style: Optional): TextPickerAttribute; + /** * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. * @@ -726,7 +801,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(value: PickerTextStyle): TextPickerAttribute; @@ -740,10 +816,23 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(style: Optional): TextPickerAttribute; + /** + * Sets the text style of normal items + * + * @param { Optional } style - indicates the text style of normal items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + textStyle(style: Optional): TextPickerAttribute; + /** * Sets the font color, font size, and font weight for the selected item. * @@ -761,7 +850,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; @@ -774,10 +864,23 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(style: Optional): TextPickerAttribute; + /** + * Sets the text style of selected items + * + * @param { Optional } style - indicates the text style of selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedTextStyle(style: Optional): TextPickerAttribute; + /** * Sets whether to enable the text style change animation during the scrolling process. * @@ -787,7 +890,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; @@ -799,7 +903,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; @@ -869,7 +974,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): TextPickerAttribute; @@ -884,7 +990,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; @@ -899,7 +1006,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop(callback: Optional): TextPickerAttribute; @@ -914,7 +1022,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute; @@ -943,7 +1052,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedIndex(value: number | number[]): TextPickerAttribute; @@ -961,7 +1071,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedIndex(index: Optional): TextPickerAttribute; @@ -973,7 +1084,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ divider(value: DividerOptions | null): TextPickerAttribute; @@ -985,7 +1097,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ divider(textDivider: Optional): TextPickerAttribute; @@ -1003,7 +1116,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ gradientHeight(value: Dimension): TextPickerAttribute; @@ -1015,7 +1129,8 @@ declare class TextPickerAttribute extends CommonMethod { * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: Optional): TextPickerAttribute; @@ -1035,7 +1150,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ gradientHeight(height: Optional): TextPickerAttribute; @@ -1048,7 +1164,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; @@ -1087,7 +1204,8 @@ declare class TextPickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerResult { /** @@ -1114,7 +1232,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ value: string | string[]; @@ -1140,7 +1259,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ index: number | number[]; } @@ -1170,7 +1290,8 @@ declare interface TextPickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextPickerDialogOptions extends TextPickerOptions { /** @@ -1196,7 +1317,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultPickerItemHeight?: number | string; @@ -1217,7 +1339,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ canLoop?: boolean; @@ -1236,7 +1359,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle?: PickerTextStyle; @@ -1255,7 +1379,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: PickerTextStyle; @@ -1272,7 +1397,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -1289,7 +1415,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -1308,7 +1435,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle?: PickerTextStyle; @@ -1322,7 +1450,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ disableTextStyleAnimation?: boolean; @@ -1337,7 +1466,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ defaultTextStyle?: TextPickerTextStyle; @@ -1363,7 +1493,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAccept?: (value: TextPickerResult) => void; @@ -1389,7 +1520,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: () => void; @@ -1415,7 +1547,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange?: (value: TextPickerResult) => void; @@ -1426,7 +1559,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onScrollStop?: Callback; @@ -1449,7 +1583,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea?: Callback; @@ -1470,7 +1605,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -1490,7 +1626,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -1510,7 +1647,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -1531,7 +1669,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -1552,7 +1691,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -1563,7 +1703,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -1574,7 +1715,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -1595,7 +1737,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: () => void; @@ -1611,7 +1754,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: () => void; @@ -1629,8 +1773,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: () => void; @@ -1648,7 +1792,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: () => void; @@ -1661,7 +1806,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -1673,7 +1819,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1685,7 +1832,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1704,7 +1852,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback?: boolean; @@ -1712,8 +1861,355 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * Background style of selected items. * * @type { ?PickerBackgroundStyle } + * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle?: PickerBackgroundStyle; +} + +/** + * Defines the TextPickerDialogOptionsExt for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptionsExt + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface TextPickerDialogOptionsExt extends TextPickerOptions { + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + defaultPickerItemHeight?: number | string; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop?: boolean; + + /** + * Text style of disappearing items. + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disappearTextStyle?: TextPickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + textStyle?: TextPickerTextStyle; + + /** + * Style of accept button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedTextStyle?: TextPickerTextStyle; + + /** + * Defines whether to disable the text style animation. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disableTextStyleAnimation?: boolean; + + /** + * Defines to set the default text style for options. + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + defaultTextStyle?: TextPickerTextStyle; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAccept?: Callback; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel?: VoidCallback; + + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onChange?: Callback; + + /** + * This event is triggered when a TextPicker text is selected and scrolling has stopped in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onScrollStop?: Callback; + + /** + * This event is triggered when an item enters the selected area in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onEnterSelectedArea?: Callback; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + offset?: Offset; + + /** + * Defines the textPickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the textPickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Defines the textPickerDialog's background blur style with options + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Defines the textPickerDialog's background effect with options + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Callback function when the dialog appears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onDidAppear?: VoidCallback; + + /** + * Callback function when the dialog disappears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onDidDisappear?: VoidCallback; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillAppear?: VoidCallback; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillDisappear?: VoidCallback; + + /** + * Defines the dialog's shadow. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Defines whether to respond to the hover mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + enableHoverMode?: boolean; + + /** + * Defines the dialog's display area in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Enable or disable haptic feedback. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enableHapticFeedback?: boolean; + + /** + * Background style of selected items. + * + * @type { ?PickerBackgroundStyle } + * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } + * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 */ @@ -1739,7 +2235,8 @@ declare interface TextPickerDialogOptions extends TextPickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextPickerDialog { /** diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index 561aae84168e89608a2054a3e48df4ca3a357538..c3a15592a95904f1087ab93a15a4ff725c17d5ea 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonConfiguration,CommonMethod,ShadowOptions,ContentModifier } from './common' +import { ResourceColor,Length,ResourceStr } from './units' +import { FontStyle,FontWeight } from './enums' +/*** endif */ + /** * Provides a way to control the process. * @@ -38,7 +44,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TextTimerController { /** @@ -63,7 +70,8 @@ declare class TextTimerController { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -92,6 +100,18 @@ declare class TextTimerController { */ start(); + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start():void; + /** * Provides a pause event for timer. * @@ -117,6 +137,18 @@ declare class TextTimerController { */ pause(); + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pause():void; + /** * Provides an event to reset timer. * @@ -141,6 +173,18 @@ declare class TextTimerController { * @since 11 */ reset(); + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + reset():void; } /** @@ -151,7 +195,8 @@ declare class TextTimerController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TextTimerConfiguration extends CommonConfiguration { /** @@ -169,7 +214,8 @@ declare interface TextTimerConfiguration extends CommonConfiguration { /** @@ -454,7 +510,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ format(value: string): TextTimerAttribute; @@ -485,7 +542,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontColor(value: ResourceColor): TextTimerAttribute; @@ -518,7 +576,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize(value: Length): TextTimerAttribute; @@ -549,7 +608,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle(value: FontStyle): TextTimerAttribute; @@ -599,6 +659,7 @@ declare class TextTimerAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; @@ -629,7 +690,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily(value: ResourceStr): TextTimerAttribute; @@ -662,7 +724,8 @@ declare class TextTimerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; @@ -685,7 +748,8 @@ declare class TextTimerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadow(value: ShadowOptions | Array): TextTimerAttribute; @@ -697,7 +761,8 @@ declare class TextTimerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): TextTimerAttribute; } diff --git a/api/@internal/component/ets/time_picker.d.ts b/api/@internal/component/ets/time_picker.d.ts index 7e0e922eff63c71e862104e4d556c3e7c69415e7..cdd61ed3e140ea0d6bf157c1b9aa55cd7a1e426c 100644 --- a/api/@internal/component/ets/time_picker.d.ts +++ b/api/@internal/component/ets/time_picker.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceColor, Offset } from './units'; +import { CommonMethod, PickerTextStyle, PickerDialogButtonStyle, Rectangle, BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, + BackgroundBlurStyleOptions, BackgroundEffectOptions, Optional, Callback, DateTimeOptions, Bindable } from './common'; +import { DialogAlignment } from './alertDialog'; +import { CrownSensitivity } from './enums'; +/*** endif */ + /** * Defines the struct of TimePickerResult. * @@ -40,7 +48,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TimePickerResult { /** @@ -65,7 +74,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hour: number; @@ -91,7 +101,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minute: number; @@ -102,7 +113,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ second: number; } @@ -120,7 +132,8 @@ declare interface TimePickerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum TimePickerFormat { /** @@ -134,7 +147,8 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOUR_MINUTE, @@ -149,7 +163,8 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HOUR_MINUTE_SECOND, } @@ -176,7 +191,8 @@ declare enum TimePickerFormat { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TimePickerOptions { /** @@ -201,7 +217,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selected?: Date; @@ -222,7 +239,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ format?: TimePickerFormat; @@ -233,7 +251,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ start?: Date; @@ -244,7 +263,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ end?: Date; } @@ -271,7 +291,8 @@ declare interface TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface TimePickerInterface { /** @@ -299,7 +320,8 @@ interface TimePickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: TimePickerOptions): TimePickerAttribute; } @@ -321,7 +343,8 @@ declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptio * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; @@ -347,7 +370,8 @@ declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TimePickerAttribute extends CommonMethod { /** @@ -375,7 +399,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime(value: boolean): TimePickerAttribute; @@ -387,7 +412,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; @@ -406,7 +432,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): TimePickerAttribute; @@ -417,7 +444,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ loop(isLoop: Optional): TimePickerAttribute; @@ -438,7 +466,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; @@ -450,7 +479,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle(style: Optional): TimePickerAttribute; @@ -471,7 +501,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(value: PickerTextStyle): TimePickerAttribute; @@ -483,7 +514,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle(style: Optional): TimePickerAttribute; @@ -504,7 +536,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(value: PickerTextStyle): TimePickerAttribute; @@ -516,7 +549,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle(style: Optional): TimePickerAttribute; @@ -528,8 +562,9 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; /** @@ -540,8 +575,9 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - */ + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ dateTimeOptions(timeFormat: Optional): TimePickerAttribute; /** @@ -581,7 +617,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: Optional): TimePickerAttribute; @@ -593,7 +630,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea(callback: Callback): TimePickerAttribute; @@ -604,7 +642,8 @@ declare class TimePickerAttribute extends CommonMethod { * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: boolean): TimePickerAttribute; @@ -615,7 +654,8 @@ declare class TimePickerAttribute extends CommonMethod { * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enable: Optional): TimePickerAttribute; @@ -627,7 +667,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; @@ -639,7 +680,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableCascade(enabled: boolean): TimePickerAttribute; } @@ -669,7 +711,8 @@ declare class TimePickerAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TimePickerDialogOptions extends TimePickerOptions { /** @@ -694,7 +737,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ useMilitaryTime?: boolean; @@ -713,7 +757,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ disappearTextStyle?: PickerTextStyle; @@ -732,7 +777,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: PickerTextStyle; @@ -743,7 +789,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -754,7 +801,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -773,7 +821,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedTextStyle?: PickerTextStyle; @@ -792,7 +841,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maskRect?: Rectangle; @@ -811,7 +861,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ alignment?: DialogAlignment; @@ -830,7 +881,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ offset?: Offset; @@ -856,7 +908,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onAccept?: (value: TimePickerResult) => void; @@ -882,7 +935,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel?: () => void; @@ -908,7 +962,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange?: (value: TimePickerResult) => void; @@ -919,7 +974,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onEnterSelectedArea?: Callback; @@ -940,7 +996,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; @@ -961,7 +1018,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; @@ -972,7 +1030,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -983,7 +1042,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; @@ -995,7 +1055,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableCascade?: boolean; @@ -1006,7 +1067,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidAppear?: () => void; @@ -1017,7 +1079,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onDidDisappear?: () => void; @@ -1028,7 +1091,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillAppear?: () => void; @@ -1039,7 +1103,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onWillDisappear?: () => void; @@ -1050,7 +1115,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; @@ -1061,7 +1127,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeOptions?: DateTimeOptions; @@ -1073,7 +1140,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableHoverMode?: boolean; @@ -1085,7 +1153,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; @@ -1096,7 +1165,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback?: boolean; } @@ -1120,7 +1190,8 @@ declare interface TimePickerDialogOptions extends TimePickerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class TimePickerDialog { /** diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts index 85c27baa49cae0c6d55796cf581bbe6418b043fa..92641994621e931cb4e88ab72c311bff9aecd778 100644 --- a/api/@internal/component/ets/toggle.d.ts +++ b/api/@internal/component/ets/toggle.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ResourceColor } from './units'; +import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Bindable } from './common'; +/*** endif */ + /** * Declare the type of status button * @@ -50,7 +56,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ToggleType { /** @@ -81,7 +88,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Checkbox, @@ -113,7 +121,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Switch, @@ -145,7 +154,8 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Button, } @@ -157,7 +167,8 @@ declare enum ToggleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SwitchStyle { /** @@ -167,7 +178,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pointRadius?: number | Resource; @@ -178,7 +190,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unselectedColor?: ResourceColor; @@ -189,7 +202,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pointColor?: ResourceColor; @@ -200,7 +214,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackBorderRadius?: number | Resource; } @@ -213,7 +228,8 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ToggleConfiguration extends CommonConfiguration { @@ -224,7 +240,8 @@ declare interface ToggleConfiguration extends CommonConfiguration; } @@ -259,7 +278,8 @@ declare interface ToggleConfiguration extends CommonConfiguration { /** @@ -516,7 +541,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onChange(callback: (isOn: boolean) => void): ToggleAttribute; @@ -528,7 +554,8 @@ declare class ToggleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentModifier(modifier: ContentModifier): ToggleAttribute; @@ -568,7 +595,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ selectedColor(value: ResourceColor): ToggleAttribute; @@ -608,7 +636,8 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ switchPointColor(color: ResourceColor): ToggleAttribute; @@ -620,7 +649,8 @@ declare class ToggleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ switchStyle(value: SwitchStyle): ToggleAttribute; } diff --git a/api/@internal/component/ets/ui_extension_component.d.ts b/api/@internal/component/ets/ui_extension_component.d.ts index d3b85e3b247da9e8b788d09dc8573e8e123cf2a7..7fe841ede722e672076d2213ea367196129b17d4 100644 --- a/api/@internal/component/ets/ui_extension_component.d.ts +++ b/api/@internal/component/ets/ui_extension_component.d.ts @@ -18,13 +18,21 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import Want from '../../@ohos.app.ability.Want' +import { Callback, ErrorCallback, BusinessError } from '../../@ohos.base' +import { CommonMethod, TerminationInfo } from './common' +import { ComponentContent } from '../ComponentContent' +/*** endif */ + /** * Enumeration of different types of DpiFollowStrategy. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum DpiFollowStrategy { /** @@ -32,7 +40,8 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_HOST_DPI = 0, @@ -41,7 +50,8 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOLLOW_UI_EXTENSION_ABILITY_DPI = 1, } @@ -68,7 +78,7 @@ declare enum WindowModeFollowStrategy { * @systemapi * @since 18 */ - FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1, + FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1 } /** @@ -77,7 +87,8 @@ declare enum WindowModeFollowStrategy { * @interface UIExtensionOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface UIExtensionOptions { /** @@ -88,7 +99,8 @@ declare interface UIExtensionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isTransferringCaller?: boolean; @@ -99,7 +111,8 @@ declare interface UIExtensionOptions { * @type { ?ComponentContent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ placeholder?: ComponentContent; @@ -111,7 +124,8 @@ declare interface UIExtensionOptions { * @type { ?Record } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ areaChangePlaceholder?: Record; @@ -122,7 +136,8 @@ declare interface UIExtensionOptions { * @default DpiFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_DPI * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dpiFollowStrategy?: DpiFollowStrategy; @@ -178,6 +193,17 @@ declare interface TerminationInfo { */ declare type ReceiveCallback = import('../api/@ohos.base').Callback>; +/** + * Get Callback from @ohos.base. + * + * @typedef { Callback> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ +type ReceiveCallback = Callback>; + /** * This interface is used for send data to the UIExtensionAbility.
* It is returned from onRemoteReady callback of UIExtensionComponent
@@ -186,7 +212,8 @@ declare type ReceiveCallback = import('../api/@ohos.base').Callback } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ send(data: Record): void; @@ -229,7 +257,8 @@ declare interface UIExtensionProxy { * @throws { BusinessError } 100012 - Transferring data failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sendSync(data: Record): Record; @@ -250,7 +279,8 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'asyncReceiverRegister', callback: Callback): void; @@ -271,7 +301,8 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'syncReceiverRegister', callback: Callback): void; @@ -292,7 +323,8 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'asyncReceiverRegister', callback?: Callback): void; @@ -313,7 +345,8 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'syncReceiverRegister', callback?: Callback): void; } @@ -325,7 +358,8 @@ declare interface UIExtensionProxy { * @interface UIExtensionComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIExtensionComponentInterface { /** @@ -353,6 +387,24 @@ interface UIExtensionComponentInterface { want: import('../api/@ohos.app.ability.Want').default, options?: UIExtensionOptions ): UIExtensionComponentAttribute; + + /** + * Construct the UIExtensionComponent.
+ * Called when the UIExtensionComponent is used. + * + * @param { Want } want - indicates the want of UIExtensionAbility + * @param { UIExtensionOptions } [options] - Construction configuration of UIExtensionComponentAttribute + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + ( + want: Want, + options?: UIExtensionOptions + ): UIExtensionComponentAttribute; } /** @@ -361,7 +413,8 @@ interface UIExtensionComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class UIExtensionComponentAttribute extends CommonMethod { /** @@ -376,6 +429,21 @@ declare class UIExtensionComponentAttribute extends CommonMethod ): UIExtensionComponentAttribute; + + /** + * callback called when remote UIExtensionAbility object is ready for receive data + * + * @param { Callback } callback + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onRemoteReady( + callback: Callback + ): UIExtensionComponentAttribute; /** * @param { import('../api/@ohos.base').Callback<{ [key: string]: Object }> } callback @@ -392,7 +460,8 @@ declare class UIExtensionComponentAttribute extends CommonMethod } callback + * @returns { UIExtensionComponentAttribute } + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError( + callback: ErrorCallback + ): UIExtensionComponentAttribute; /** * Called when the provider of the embedded UI is terminated. @@ -447,7 +531,8 @@ declare class UIExtensionComponentAttribute extends CommonMethod): UIExtensionComponentAttribute; diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 13660a7d9124b7eaa9f893f136c0fa2d85effc18..97d157a81483aa3aefc897f7b2ca1d73333fefa6 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource as _Resource } from '../../global/resource'; +import { Color, BorderStyle, FontWeight, FontStyle, DividerMode} from './enums'; +import { OutlineStyle } from './common'; +import { LengthMetricsUnit as _LengthMetricsUnit, LengthMetrics as _LengthMetrics, ColorMetrics as _ColorMetrics } from '../Graphics'; +/*** endif */ + /** * Defines the data type of the interface restriction. * @@ -56,6 +63,19 @@ */ declare type Resource = import('../api/global/resource').Resource; +/** + * Defines the data type of the interface restriction. + * + * @typedef { _Resource } Resource + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Resource = _Resource; + /** * Defines the length property with string, number and resource unit. * @@ -88,7 +108,8 @@ declare type Resource = import('../api/global/resource').Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Length = string | number | Resource; @@ -118,6 +139,17 @@ declare type Length = string | number | Resource; */ declare type PX = `${number}px`; + +/** + * Defines the length property with number in units of px. + * + * @typedef { string } PX + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type PX = string; /** * Defines the length property with number or number in units of vp. * @@ -144,6 +176,17 @@ declare type PX = `${number}px`; */ declare type VP = `${number}vp` | number; +/** + * Defines the length property with number or number in units of vp. + * + * @typedef { string | number } VP + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type VP = string | number; + /** * Defines the length property with number in units of fp. * @@ -170,6 +213,17 @@ declare type VP = `${number}vp` | number; */ declare type FP = `${number}fp`; +/** + * Defines the length property with number in units of fp. + * + * @typedef { string } FP + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type FP = string; + /** * Defines the length property with number in units of lpx. * @@ -196,6 +250,17 @@ declare type FP = `${number}fp`; */ declare type LPX = `${number}lpx`; +/** + * Defines the length property with number in units of lpx. + * + * @typedef { string } LPX + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LPX = string; + /** * Defines the length property with number in units of Percentage. * @@ -222,6 +287,17 @@ declare type LPX = `${number}lpx`; */ declare type Percentage = `${number}%`; +/** + * Defines the length property with number in units of Percentage. + * + * @typedef { string } Percentage + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Percentage = string; + /** * Defines the angle property with number in units of deg. * @@ -239,6 +315,17 @@ declare type Percentage = `${number}%`; */ declare type Degree = `${number}deg`; +/** + * Defines the angle property with number in units of deg. + * + * @typedef { string } Degree + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type Degree = string; + /** * Defines the dimension property with number with units(vp|px|fp|lpx|%), and resource. * @@ -261,7 +348,8 @@ declare type Degree = `${number}deg`; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Dimension = PX | VP | FP | LPX | Percentage | Resource; @@ -297,7 +385,8 @@ declare type Dimension = PX | VP | FP | LPX | Percentage | Resource; * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ResourceStr = string | Resource; @@ -332,7 +421,19 @@ declare type ResourceStr = string | Resource; * @atomicservice * @since 11 */ -declare type Padding = { +/** + * Defines the padding property. + * + * Anonymous Object Rectification + * @typedef { object } Padding + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface Padding { /** * top property. * @@ -364,7 +465,8 @@ declare type Padding = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ top?: Length; @@ -400,7 +502,8 @@ declare type Padding = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ right?: Length; @@ -436,7 +539,8 @@ declare type Padding = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottom?: Length; @@ -472,7 +576,8 @@ declare type Padding = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ left?: Length; @@ -486,7 +591,8 @@ declare type Padding = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedPadding { /** @@ -497,7 +603,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -509,7 +616,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; @@ -521,7 +629,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -533,7 +642,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; }; @@ -570,7 +680,8 @@ declare interface LocalizedPadding { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type Margin = Padding; @@ -589,7 +700,8 @@ declare type Margin = Padding; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type EdgeWidth = EdgeWidths; @@ -620,7 +732,19 @@ declare type EdgeWidth = EdgeWidths; * @atomicservice * @since 11 */ -declare type EdgeWidths = { +/** + * Defines the border width property. + * + * Anonymous Object Rectification + * @typedef { object } EdgeWidths + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeWidths { /** * top property. * @@ -645,7 +769,8 @@ declare type EdgeWidths = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ top?: Length; @@ -674,7 +799,8 @@ declare type EdgeWidths = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ right?: Length; @@ -703,7 +829,8 @@ declare type EdgeWidths = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottom?: Length; @@ -732,7 +859,8 @@ declare type EdgeWidths = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ left?: Length; @@ -746,7 +874,8 @@ declare type EdgeWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdgeWidths { /** @@ -757,7 +886,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -769,7 +899,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; @@ -781,7 +912,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -793,7 +925,8 @@ declare interface LocalizedEdgeWidths { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; }; @@ -816,7 +949,18 @@ declare interface LocalizedEdgeWidths { * @atomicservice * @since 12 */ -declare type EdgeOutlineWidths = { +/** + * Defines the outline width property. + * + * @interface EdgeOutlineWidths + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeOutlineWidths { /** * top outline width property. * @@ -834,7 +978,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Dimension; @@ -855,7 +1000,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Dimension; @@ -876,7 +1022,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Dimension; @@ -897,7 +1044,8 @@ declare type EdgeOutlineWidths = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Dimension; }; @@ -929,7 +1077,19 @@ declare type EdgeOutlineWidths = { * @atomicservice * @since 11 */ -declare type BorderRadiuses = { +/** + * Defines the border radius property. + * + * Anonymous Object Rectification + * @typedef { object } BorderRadiuses + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface BorderRadiuses { /** * top-left property. * @@ -954,7 +1114,8 @@ declare type BorderRadiuses = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ topLeft?: Length; @@ -983,7 +1144,8 @@ declare type BorderRadiuses = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ topRight?: Length; @@ -1012,7 +1174,8 @@ declare type BorderRadiuses = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottomLeft?: Length; @@ -1041,7 +1204,8 @@ declare type BorderRadiuses = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottomRight?: Length; @@ -1055,7 +1219,8 @@ declare type BorderRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedBorderRadiuses { /** @@ -1066,7 +1231,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topStart?: LengthMetrics; @@ -1078,7 +1244,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topEnd?: LengthMetrics; @@ -1090,7 +1257,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomStart?: LengthMetrics; @@ -1102,7 +1270,8 @@ declare interface LocalizedBorderRadiuses { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomEnd?: LengthMetrics; }; @@ -1126,7 +1295,18 @@ declare interface LocalizedBorderRadiuses { * @atomicservice * @since 12 */ -declare type OutlineRadiuses = { +/** + * Defines the outline radius property. + * + * @interface OutlineRadiuses + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface OutlineRadiuses { /** * top-left property. * @@ -1144,7 +1324,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topLeft?: Dimension; @@ -1165,7 +1346,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topRight?: Dimension; @@ -1186,7 +1368,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomLeft?: Dimension; @@ -1207,7 +1390,8 @@ declare type OutlineRadiuses = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottomRight?: Dimension; }; @@ -1239,7 +1423,19 @@ declare type OutlineRadiuses = { * @atomicservice * @since 11 */ -declare type EdgeColors = { +/** + * Defines the border color property. + * + * Anonymous Object Rectification + * @typedef { object } EdgeColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeColors { /** * top property. * @@ -1264,7 +1460,8 @@ declare type EdgeColors = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ top?: ResourceColor; @@ -1293,7 +1490,8 @@ declare type EdgeColors = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ right?: ResourceColor; @@ -1322,7 +1520,8 @@ declare type EdgeColors = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottom?: ResourceColor; @@ -1351,7 +1550,8 @@ declare type EdgeColors = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ left?: ResourceColor; @@ -1365,7 +1565,8 @@ declare type EdgeColors = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdgeColors { /** @@ -1376,7 +1577,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: ResourceColor; @@ -1388,7 +1590,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: ResourceColor; @@ -1400,7 +1603,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: ResourceColor; @@ -1412,7 +1616,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: ResourceColor; }; @@ -1425,7 +1630,8 @@ declare interface LocalizedEdgeColors { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type LocalizedMargin = LocalizedPadding; @@ -1456,7 +1662,19 @@ declare type LocalizedMargin = LocalizedPadding; * @atomicservice * @since 11 */ -declare type EdgeStyles = { +/** + * Defines the border style property. + * + * Anonymous Object Rectification + * @typedef { object } EdgeStyles + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeStyles { /** * top property. * @@ -1481,7 +1699,8 @@ declare type EdgeStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ top?: BorderStyle; @@ -1510,7 +1729,8 @@ declare type EdgeStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ right?: BorderStyle; @@ -1539,7 +1759,8 @@ declare type EdgeStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ bottom?: BorderStyle; @@ -1568,7 +1789,8 @@ declare type EdgeStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ left?: BorderStyle; @@ -1593,7 +1815,18 @@ declare type EdgeStyles = { * @atomicservice * @since 12 */ -declare type EdgeOutlineStyles = { +/** + * Defines the outline style property. + * + * @interface EdgeOutlineStyles + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface EdgeOutlineStyles { /** * top property. * @@ -1611,7 +1844,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: OutlineStyle; @@ -1632,7 +1866,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: OutlineStyle; @@ -1653,7 +1888,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: OutlineStyle; @@ -1674,7 +1910,8 @@ declare type EdgeOutlineStyles = { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: OutlineStyle; }; @@ -1701,9 +1938,10 @@ declare type EdgeOutlineStyles = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ -declare type Offset = { +declare interface Offset { /** * dx property. * @@ -1726,7 +1964,8 @@ declare type Offset = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dx: Length; @@ -1752,7 +1991,8 @@ declare type Offset = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ dy: Length; }; @@ -1789,7 +2029,8 @@ declare type Offset = { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare type ResourceColor = Color | number | string | Resource; @@ -1820,7 +2061,19 @@ declare type ResourceColor = Color | number | string | Resource; * @atomicservice * @since 11 */ -declare type LengthConstrain = { +/** + * Defines the length constrain property. + * + * Anonymous Object Rectification + * @typedef { object } LengthConstrain + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare interface LengthConstrain { /** * minimum length. * @@ -1845,7 +2098,8 @@ declare type LengthConstrain = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ minLength: Length; @@ -1874,7 +2128,8 @@ declare type LengthConstrain = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 * @form */ maxLength: Length; @@ -1887,7 +2142,8 @@ declare type LengthConstrain = { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type VoidCallback = () => void; @@ -1903,6 +2159,19 @@ declare type VoidCallback = () => void; */ declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUnit; +/** + * Defines length metrics unit. + * + * @typedef { _LengthMetricsUnit } LengthMetricsUnit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LengthMetricsUnit = _LengthMetricsUnit; + /** * Defines LengthMetrics. * @@ -1914,6 +2183,18 @@ declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUn */ declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics; +/** + * Defines LengthMetrics. + * + * @typedef { _LengthMetrics } LengthMetrics + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type LengthMetrics = _LengthMetrics; + /** * Defines ColorMetrics. * @@ -1925,6 +2206,18 @@ declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics; */ declare type ColorMetrics = import('../api/arkui/Graphics').ColorMetrics; +/** + * Defines ColorMetrics. + * + * @typedef { _ColorMetrics } ColorMetrics + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare type ColorMetrics = _ColorMetrics; + /** * Defines the font used for text. * @@ -1947,7 +2240,8 @@ declare type ColorMetrics = import('../api/arkui/Graphics').ColorMetrics; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Font { /** @@ -1972,7 +2266,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -1998,7 +2293,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ weight?: FontWeight | number | string; @@ -2024,7 +2320,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ family?: string | Resource; @@ -2050,7 +2347,8 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: FontStyle; } @@ -2087,7 +2385,8 @@ declare interface Font { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Area { /** @@ -2122,7 +2421,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width: Length; @@ -2158,7 +2458,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height: Length; @@ -2194,7 +2495,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ position: Position; @@ -2230,7 +2532,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ globalPosition: Position; } @@ -2267,7 +2570,8 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Position { /** @@ -2302,7 +2606,8 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: Length; @@ -2338,7 +2643,8 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: Length; } @@ -2350,7 +2656,8 @@ declare interface Position { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedPosition { /** @@ -2360,7 +2667,8 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; @@ -2371,7 +2679,8 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; } @@ -2384,7 +2693,8 @@ declare interface LocalizedPosition { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Edges { /** @@ -2395,7 +2705,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: Dimension; @@ -2407,7 +2718,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left?: Dimension; @@ -2419,7 +2731,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: Dimension; @@ -2431,7 +2744,8 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ right?: Dimension; } @@ -2443,7 +2757,8 @@ declare interface Edges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LocalizedEdges { /** @@ -2453,7 +2768,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top?: LengthMetrics; @@ -2464,7 +2780,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start?: LengthMetrics; @@ -2475,7 +2792,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom?: LengthMetrics; @@ -2486,7 +2804,8 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end?: LengthMetrics; } @@ -2508,7 +2827,8 @@ declare interface LocalizedEdges { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Bias { /** @@ -2530,7 +2850,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ horizontal?: number; @@ -2553,7 +2874,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ vertical?: number; } @@ -2590,7 +2912,8 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ConstraintSizeOptions { /** @@ -2625,7 +2948,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minWidth?: Length; @@ -2661,7 +2985,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxWidth?: Length; @@ -2697,7 +3022,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ minHeight?: Length; @@ -2733,7 +3059,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxHeight?: Length; } @@ -2770,7 +3097,8 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SizeOptions { /** @@ -2805,7 +3133,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Length; @@ -2841,7 +3170,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Length; } @@ -2888,7 +3218,8 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface BorderOptions { /** @@ -2933,7 +3264,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: EdgeWidths | Length | LocalizedEdgeWidths; @@ -2979,7 +3311,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3025,7 +3358,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: BorderRadiuses | Length | LocalizedBorderRadiuses; @@ -3061,7 +3395,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ style?: EdgeStyles | BorderStyle; @@ -3072,7 +3407,8 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dashGap?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; @@ -3083,7 +3419,8 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dashWidth?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; } @@ -3105,7 +3442,8 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OutlineOptions { /** @@ -3125,7 +3463,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: EdgeOutlineWidths | Dimension; @@ -3146,7 +3485,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3167,7 +3507,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: OutlineRadiuses | Dimension; @@ -3188,7 +3529,8 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ style?: EdgeOutlineStyles | OutlineStyle; } @@ -3208,7 +3550,8 @@ declare interface OutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MarkStyle { /** @@ -3226,7 +3569,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeColor?: ResourceColor; @@ -3245,7 +3589,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ size?: Length; @@ -3264,7 +3609,8 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: Length; } @@ -3291,7 +3637,8 @@ declare interface MarkStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ColorFilter { /** @@ -3319,7 +3666,8 @@ declare class ColorFilter { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(value: number[]); } @@ -3346,7 +3694,8 @@ declare class ColorFilter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface TouchPoint { /** @@ -3371,7 +3720,8 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ x: Dimension; @@ -3397,7 +3747,8 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ y: Dimension; } @@ -3410,7 +3761,8 @@ declare interface TouchPoint { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DirectionalEdgesT { /** @@ -3421,7 +3773,8 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start: T; @@ -3433,7 +3786,8 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end: T; @@ -3445,7 +3799,8 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ top: T; @@ -3457,7 +3812,8 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: T; } @@ -3469,7 +3825,8 @@ declare interface DirectionalEdgesT { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface DividerStyleOptions { /** @@ -3479,7 +3836,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strokeWidth?: LengthMetrics; @@ -3490,7 +3848,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: ResourceColor; @@ -3501,7 +3860,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startMargin?: LengthMetrics; @@ -3512,7 +3872,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ endMargin?: LengthMetrics; @@ -3523,7 +3884,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ mode?: DividerMode; } @@ -3535,7 +3897,8 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ChainWeightOptions { /** @@ -3545,7 +3908,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ horizontal?: number; @@ -3556,7 +3920,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ vertical?: number; } @@ -3568,7 +3933,8 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface AccessibilityOptions { /** @@ -3578,7 +3944,8 @@ declare interface AccessibilityOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ accessibilityPreferred?: boolean; } diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 36dc4bd16b815f143a39c2fd3d01397f271e1a79..29a25dc16743033c5824d1d324b695d0ff27076b 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -18,6 +18,14 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from '../../global/resource'; +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { ImageFit } from './enums'; +import { CommonMethod, Callback, PixelMap } from './common'; +import { VoidCallback, ColorMetrics } from './units'; +/*** endif */ + /** * Seek mode. * @@ -40,7 +48,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum SeekMode { /** @@ -62,7 +71,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PreviousKeyframe, @@ -85,7 +95,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NextKeyframe, @@ -108,7 +119,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ClosestKeyframe, @@ -131,7 +143,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Accurate, } @@ -158,7 +171,8 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum PlaybackSpeed { /** @@ -180,7 +194,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_0_75_X, @@ -203,7 +218,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_00_X, @@ -226,7 +242,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_25_X, @@ -249,7 +266,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_1_75_X, @@ -272,7 +290,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Speed_Forward_2_00_X, } @@ -284,7 +303,8 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface FullscreenInfo { /** @@ -311,7 +331,8 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fullscreen: boolean; } @@ -323,7 +344,8 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface PreparedInfo { /** @@ -350,7 +372,8 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ duration: number; } @@ -362,7 +385,8 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface PlaybackInfo { /** @@ -389,7 +413,8 @@ interface PlaybackInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ time: number; } @@ -400,7 +425,8 @@ interface PlaybackInfo { * @interface PosterOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface PosterOptions { /** @@ -410,7 +436,8 @@ declare interface PosterOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ showFirstFrame?: boolean; } @@ -446,7 +473,8 @@ declare interface PosterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface VideoOptions { /** @@ -471,7 +499,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ src?: string | Resource; @@ -497,7 +526,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ currentProgressRate?: number | string | PlaybackSpeed; @@ -523,7 +553,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ previewUri?: string | PixelMap | Resource; @@ -549,7 +580,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: VideoController; @@ -559,7 +591,8 @@ declare interface VideoOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ imageAIOptions?: ImageAIOptions; @@ -569,7 +602,8 @@ declare interface VideoOptions { * @type { ?PosterOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ posterOptions?: PosterOptions; } @@ -593,7 +627,8 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class VideoController { /** @@ -615,7 +650,8 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -642,6 +678,17 @@ declare class VideoController { */ start(); + /** + * Provides events to play. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + start(): void; + /** * Provides a pause event for playback. * @@ -665,6 +712,17 @@ declare class VideoController { */ pause(); + /** + * Provides a pause event for playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + pause(): void; + /** * Provides an event to stop playback. * @@ -688,6 +746,17 @@ declare class VideoController { */ stop(); + /** + * Provides an event to stop playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + stop(): void; + /** * Provide the progress method of video playback. * @@ -714,6 +783,18 @@ declare class VideoController { */ setCurrentTime(value: number); + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + setCurrentTime(value: number): void; + /** * Provides a full screen playback method. * @@ -740,6 +821,18 @@ declare class VideoController { */ requestFullscreen(value: boolean); + /** + * Provides a full screen playback method. + * + * @param { boolean } value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + requestFullscreen(value: boolean): void; + /** * Provides a method to exit full screen playback. * @@ -763,6 +856,17 @@ declare class VideoController { */ exitFullscreen(); + /** + * Provides a method to exit full screen playback. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + exitFullscreen(): void; + /** * Provide the progress method of video playback. * @@ -792,12 +896,26 @@ declare class VideoController { */ setCurrentTime(value: number, seekMode: SeekMode); + /** + * Provide the progress method of video playback. + * + * @param { number } value + * @param { SeekMode } seekMode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + setCurrentTime(value: number, seekMode: SeekMode): void; + /** * Provide the reset method of video playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; } @@ -824,7 +942,8 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoInterface { /** @@ -852,7 +971,8 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (value: VideoOptions): VideoAttribute; } @@ -879,7 +999,8 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class VideoAttribute extends CommonMethod { /** @@ -907,7 +1028,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ muted(value: boolean): VideoAttribute; @@ -936,7 +1058,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ autoPlay(value: boolean): VideoAttribute; @@ -965,7 +1088,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ controls(value: boolean): VideoAttribute; @@ -994,7 +1118,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ loop(value: boolean): VideoAttribute; @@ -1023,7 +1148,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ objectFit(value: ImageFit): VideoAttribute; @@ -1063,7 +1189,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onStart(event: VoidCallback): VideoAttribute; @@ -1103,7 +1230,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPause(event: VoidCallback): VideoAttribute; @@ -1143,7 +1271,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish(event: VoidCallback): VideoAttribute; @@ -1183,7 +1312,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onFullscreenChange(callback: Callback): VideoAttribute; @@ -1223,7 +1353,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onPrepared(callback: Callback): VideoAttribute; @@ -1263,7 +1394,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSeeking(callback: Callback): VideoAttribute; @@ -1303,7 +1435,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onSeeked(callback: Callback): VideoAttribute; @@ -1343,7 +1476,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onUpdate(callback: Callback): VideoAttribute; @@ -1385,6 +1519,19 @@ declare class VideoAttribute extends CommonMethod { * @since 20 */ onError(event: VoidCallback | import('../api/@ohos.base').ErrorCallback): VideoAttribute; + + /** + * Called when playback fails. + * + * @param { function } event + * @returns { VideoAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onError(event: () => void): VideoAttribute; /** * Called when the video is stopped. @@ -1394,7 +1541,8 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onStop(event: Callback): VideoAttribute; @@ -1405,7 +1553,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): VideoAttribute; @@ -1416,7 +1565,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ analyzerConfig(config: ImageAnalyzerConfig): VideoAttribute; @@ -1427,7 +1577,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceBackgroundColor(color: ColorMetrics): VideoAttribute; @@ -1442,7 +1593,8 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enableShortcutKey(enabled: boolean): VideoAttribute; } diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts index 6bb9e242a5ca65ccbc179991481b55175b594a1e..a46ceed8047a82b38202fb2da38d53d79b3eb051 100644 --- a/api/@internal/component/ets/water_flow.d.ts +++ b/api/@internal/component/ets/water_flow.d.ts @@ -18,6 +18,16 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ScrollableCommonMethod, NestedScrollOptions, CommonMethod, Optional, OnWillScrollCallback, OnScrollCallback } from './common'; +import { CustomBuilder } from './builder' +import { Length, Dimension, Margin, ConstraintSizeOptions, Resource } from './units'; +import { Scroller, OnScrollFrameBeginCallback } from './scroll'; +import { ScrollState } from './list' +import { FlexDirection } from './enums' +import { ComponentContent } from '../../arkui/ComponentContent' +/*** endif */ + /** * function that returns item main size by index. * @@ -27,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type GetItemMainSizeByIndex = (index: number) => number; @@ -37,18 +48,21 @@ declare type GetItemMainSizeByIndex = (index: number) => number; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SectionOptions { /** * The number of FlowItems in this section. * * @type { number } itemsCount - Number of water flow items in the section. The value must be a positive integer. - * If the splice, push, or update APIs receive a section where the itemsCount value is less than 0, these APIs will not be executed. + * If the splice, push, or update APIs receive a section + * where the itemsCount value is less than 0, these APIs will not be executed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ itemsCount: number; @@ -61,7 +75,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ crossCount?: number; @@ -82,7 +97,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onGetItemMainSizeByIndex?: GetItemMainSizeByIndex; @@ -95,7 +111,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ columnsGap?: Dimension; @@ -108,7 +125,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rowsGap?: Dimension; @@ -120,7 +138,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ margin?: Margin | Dimension; } @@ -131,7 +150,8 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WaterFlowSections { /** @@ -140,7 +160,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -149,7 +170,8 @@ declare class WaterFlowSections { * * @param { number } start - Zero-based index at which the changing starts. The value is converted to an integer. *
NOTE - *
1. A negative index counts back from the end of the section list. If -WaterFlowSections.length() <= start < 0, start + array.length is used. + *
1. A negative index counts back from the end of the section list. + * If -WaterFlowSections.length() <= start < 0, start + array.length is used. *
2. If start < -WaterFlowSections.length(), 0 is used. *
3. If start >= WaterFlowSections.length(), a new section is added at the end. * @param { number } [deleteCount] - Number of sections to be deleted from the position specified by start. @@ -164,7 +186,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ splice(start: number, deleteCount?: number, sections?: Array): boolean; @@ -176,7 +199,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ push(section: SectionOptions): boolean; @@ -185,14 +209,17 @@ declare class WaterFlowSections { * * @param { number } sectionIndex - Zero-based index of the water flow item section to update. The value is converted to an integer. *
NOTE - *
1. A negative index counts back from the end of the section list. If -WaterFlowSections.length() <= sectionIndex < 0, sectionIndex + array.length is used. - *
2. If sectionIndex < -WaterFlowSections.length(), 0 is used.
3. If sectionIndex >= WaterFlowSections.length(), a new section is added at the end. + *
1. A negative index counts back from the end of the section list. + * If -WaterFlowSections.length() <= sectionIndex < 0, sectionIndex + array.length is used. + *
2. If sectionIndex < -WaterFlowSections.length(), 0 is used.
+ * 3. If sectionIndex >= WaterFlowSections.length(), a new section is added at the end. * @param { SectionOptions } section - New section configuration. * @returns { boolean } Whether the update was successful. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ update(sectionIndex:number, section: SectionOptions): boolean; @@ -203,7 +230,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ values(): Array; @@ -214,7 +242,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ length(): number; } @@ -226,7 +255,8 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WaterFlowLayoutMode { /** @@ -236,7 +266,8 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_TOP_DOWN = 0, @@ -248,9 +279,11 @@ declare enum WaterFlowLayoutMode { *
1. During a non-animated redirection to a distant location, water flow items are laid out forward or backward based on the target position. * If the user then swipes back to the position prior to the redirection, the layout of the content may not be consistent with its previous state. * This can lead to misalignment of the top nodes when the user swipes back to the top after the redirection. - * To counteract this issue, in this layout mode, the layout will be automatically adjusted after reaching the top of the viewport to ensure that the top is aligned. + * To counteract this issue, in this layout mode, the layout will be automatically adjusted after reaching the top of + * the viewport to ensure that the top is aligned. * If there are multiple sections, adjustments will be made to the sections within the viewport when scrolling ends. - *
2. The total offset returned by the currentOffset API of scroller is inaccurate after a redirection or data update. This offset will be recalibrated when the user swipes back to the top. + *
2. The total offset returned by the currentOffset API of scroller is inaccurate after a redirection or data update. + * This offset will be recalibrated when the user swipes back to the top. *
3. If a jump action (for example, by calling scrollToIndex without animation or scrollEdge) and * an input offset (such as from a swipe gesture or a scrolling animation) are both initiated within the same frame, both will be executed. *
4. If the scrollToIndex API is called without animation to jump to a distant position (beyond the range of visible water flow items in the window), @@ -260,7 +293,8 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLIDING_WINDOW = 1, } @@ -287,7 +321,8 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WaterFlowOptions { /** @@ -312,7 +347,8 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ footer?: CustomBuilder; @@ -323,7 +359,8 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ footerContent?: ComponentContent; @@ -353,7 +390,8 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scroller?: Scroller; @@ -369,7 +407,8 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sections?: WaterFlowSections; @@ -381,7 +420,8 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutMode?: WaterFlowLayoutMode; } @@ -467,7 +507,8 @@ declare type OnWaterFlowScrollIndexCallback = (first: number, last: number) => v * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface WaterFlowInterface { /** @@ -495,7 +536,8 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (options?: WaterFlowOptions): WaterFlowAttribute; } @@ -522,7 +564,8 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WaterFlowAttribute extends ScrollableCommonMethod { /** @@ -550,7 +593,8 @@ declare class WaterFlowAttribute extends ScrollableCommonMethod { offsetRemain: number }): WaterFlowAttribute; + /** + * Called when scrolling begin each frame. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { WaterFlowAttribute } the attribute of the water flow. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): WaterFlowAttribute; + /** + * Called when scrolling begin each frame. + * Anonymous Object Rectification. + * + * @param { OnScrollFrameBeginCallback } event - callback function, triggered when the scrolling begin each frame. + * @returns { WaterFlowAttribute } the attribute of the water flow. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): WaterFlowAttribute; + /** * Triggered when the first or last item displayed in the component changes. * It is triggered once when the component is initialized. @@ -908,9 +984,35 @@ declare class WaterFlowAttribute extends ScrollableCommonMethod void): WaterFlowAttribute; + + /** + * Called when the scrollable will scroll. + * + * @param { Optional } handler - callback of scrollable. + * @returns { WaterFlowAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onWillScroll(handler: Optional): WaterFlowAttribute; + + /** + * Called when the scrollable did scroll. + * + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. + * @returns { WaterFlowAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDidScroll(handler: OnScrollCallback): WaterFlowAttribute; } /** diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index f94ee18739a22d8f06fc82be483446ea5904dd05..7cc78b973cd687128660557a4010724645d2a15b 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -18,6 +18,24 @@ * @kit ArkWeb */ +/*** if arkts 1.2 */ +import webview from '../../@ohos.web.webview'; +import { CommonMethod, Callback } from './common'; +import { CustomBuilder } from './builder' +import { Resource } from '../../global/resource'; +/*** endif */ + +/** + * Provides methods for controlling the web controller. + * + * @typedef { webview.WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ +type WebviewController = webview.WebviewController; + /** * Provides methods for controlling the web controller. * @@ -64,6 +82,17 @@ type OnNavigationEntryCommittedCallback = (loadCommittedDetails: LoadCommittedDe */ type OnSslErrorEventCallback = (sslErrorEvent: SslErrorEvent) => void; +/** + * The callback of onOverrideErrorPage. + * + * @typedef { function } OnOverrideErrorPageCallback + * @param { OnErrorReceiveEvent } errorPageEvent - The information of error. + * @returns { string } - Return an HTML text content encoded in Base64. + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ +type OnOverrideErrorPageCallback = (errorPageEvent: OnErrorReceiveEvent) => string; + /** * The callback of largestContentfulPaint. * @@ -232,7 +261,8 @@ declare interface AdsBlockedDetails { * @interface WebKeyboardOptions * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebKeyboardOptions { /** @@ -241,7 +271,8 @@ declare interface WebKeyboardOptions { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ useSystemKeyboard: boolean; @@ -261,7 +292,8 @@ declare interface WebKeyboardOptions { * @type { ?CustomBuilder } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ customKeyboard?: CustomBuilder; } @@ -271,7 +303,8 @@ declare interface WebKeyboardOptions { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebKeyboardController { /** @@ -279,7 +312,8 @@ declare class WebKeyboardController { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -288,7 +322,8 @@ declare class WebKeyboardController { * * @param { string } text - text which will be inserted. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ insertText(text: string): void; @@ -297,7 +332,8 @@ declare class WebKeyboardController { * * @param { number } length - length of text, which will be deleted from back to front. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteForward(length: number): void; @@ -306,7 +342,8 @@ declare class WebKeyboardController { * * @param { number } length - length of text, which will be deleted from front to back. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ deleteBackward(length: number): void; @@ -334,7 +371,8 @@ declare class WebKeyboardController { * @interface WebKeyboardCallbackInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebKeyboardCallbackInfo { /** @@ -343,7 +381,8 @@ declare interface WebKeyboardCallbackInfo { * @type { WebKeyboardController } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ controller: WebKeyboardController; @@ -366,7 +405,8 @@ declare interface WebKeyboardCallbackInfo { * @returns { WebKeyboardOptions } Return the web keyboard options of this web component. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type WebKeyboardCallback = (keyboardCallbackInfo: WebKeyboardCallbackInfo) => WebKeyboardOptions; @@ -1116,7 +1156,8 @@ declare interface WebMediaOptions { * @typedef ScreenCaptureConfig * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface ScreenCaptureConfig { /** @@ -1507,7 +1548,8 @@ declare enum SslError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum FileSelectorMode { /** @@ -1522,7 +1564,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenMode = 0, @@ -1538,7 +1581,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenMultipleMode = 1, @@ -1554,7 +1598,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileOpenFolderMode = 2, @@ -1570,7 +1615,8 @@ declare enum FileSelectorMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FileSaveMode = 3 } @@ -1640,7 +1686,8 @@ declare enum RenderProcessNotRespondingReason { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FileSelectorParam { /** @@ -1655,7 +1702,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1671,7 +1719,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getTitle(): string; @@ -1687,7 +1736,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMode(): FileSelectorMode; @@ -1703,7 +1753,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAcceptType(): Array; @@ -1721,7 +1772,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isCapture(): boolean; @@ -1729,7 +1781,8 @@ declare class FileSelectorParam { * Gets an array of raw acceptable MIME type. * @returns { Array } Return an array of raw acceptable MIME type. * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Array; } @@ -1746,7 +1799,8 @@ declare class FileSelectorParam { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class JsResult { /** @@ -1761,7 +1815,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1777,7 +1832,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleCancel(): void; @@ -1793,7 +1849,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleConfirm(): void; @@ -1811,7 +1868,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handlePromptConfirm(result: string): void; } @@ -1828,7 +1886,8 @@ declare class JsResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FileSelectorResult { /** @@ -1843,7 +1902,8 @@ declare class FileSelectorResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1861,7 +1921,8 @@ declare class FileSelectorResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ handleFileList(fileList: Array): void; } @@ -1878,7 +1939,8 @@ declare class FileSelectorResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class HttpAuthHandler { /** @@ -1893,7 +1955,8 @@ declare class HttpAuthHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1965,7 +2028,8 @@ declare class HttpAuthHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class SslErrorHandler { /** @@ -1979,7 +2043,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2039,7 +2104,8 @@ declare class SslErrorHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ClientAuthenticationHandler { /** @@ -2053,7 +2119,8 @@ declare class ClientAuthenticationHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2210,7 +2277,8 @@ declare enum ProtectedResourceType { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class PermissionRequest { /** @@ -2225,7 +2293,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2241,7 +2310,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ deny(): void; @@ -2259,7 +2329,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getOrigin(): string; @@ -2277,7 +2348,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAccessibleResource(): Array; @@ -2295,7 +2367,8 @@ declare class PermissionRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ grant(resources: Array): void; } @@ -2309,7 +2382,8 @@ declare class PermissionRequest { * Defines the onScreenCapture callback, related to {@link onScreenCapture} method. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScreenCaptureHandler { /** @@ -2321,7 +2395,8 @@ declare class ScreenCaptureHandler { * Constructor. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2353,7 +2428,8 @@ declare class ScreenCaptureHandler { * @param { ScreenCaptureConfig } config The screen capture configuration. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ grant(config: ScreenCaptureConfig): void; @@ -2366,7 +2442,8 @@ declare class ScreenCaptureHandler { * Rejects this screen capture request. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ deny(): void; } @@ -2382,7 +2459,8 @@ declare class ScreenCaptureHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class DataResubmissionHandler { /** @@ -2396,7 +2474,8 @@ declare class DataResubmissionHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2491,7 +2570,8 @@ declare class ControllerHandler { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuSourceType { /** @@ -2505,7 +2585,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2520,7 +2601,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Mouse = 1, @@ -2535,7 +2617,8 @@ declare enum ContextMenuSourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LongPress = 2 } @@ -2553,7 +2636,8 @@ declare enum ContextMenuSourceType { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuMediaType { /** @@ -2567,7 +2651,8 @@ declare enum ContextMenuMediaType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2582,25 +2667,10 @@ declare enum ContextMenuMediaType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 - */ - Image = 1, - - /** - * Video. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 20 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - VIDEO = 2, - - /** - * Audio. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - AUDIO = 3 + Image = 1 } /** @@ -2616,7 +2686,8 @@ declare enum ContextMenuMediaType { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ContextMenuInputFieldType { /** @@ -2630,7 +2701,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 0, @@ -2645,7 +2717,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PlainText = 1, @@ -2660,7 +2733,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Password = 2, @@ -2675,7 +2749,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Number = 3, @@ -2690,7 +2765,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Telephone = 4, @@ -2705,7 +2781,8 @@ declare enum ContextMenuInputFieldType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Other = 5 } @@ -2929,7 +3006,8 @@ declare enum WebNavigationType { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderMode { /** @@ -2939,7 +3017,8 @@ declare enum RenderMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASYNC_RENDER = 0, @@ -2950,7 +3029,8 @@ declare enum RenderMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_RENDER = 1 } @@ -3005,7 +3085,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebContextMenuParam { /** @@ -3019,7 +3100,8 @@ declare class WebContextMenuParam { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3038,7 +3120,8 @@ declare class WebContextMenuParam { * Unit: vp. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ x(): number; @@ -3057,7 +3140,8 @@ declare class WebContextMenuParam { * Unit: vp. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ y(): number; @@ -3074,7 +3158,8 @@ declare class WebContextMenuParam { * @returns { string } If relate to a link return link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getLinkUrl(): string; @@ -3091,7 +3176,8 @@ declare class WebContextMenuParam { * @returns { string } If relate to a link return unfiltered link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getUnfilteredLinkUrl(): string; @@ -3108,7 +3194,8 @@ declare class WebContextMenuParam { * @returns { string } If this context menu is "src" attribute, return link url, else return null. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceUrl(): string; @@ -3125,7 +3212,8 @@ declare class WebContextMenuParam { * @returns { boolean } Return whether this context menu has image content. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ existsImageContents(): boolean; @@ -3142,7 +3230,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuMediaType } Returns the type of context node. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMediaType(): ContextMenuMediaType; @@ -3159,7 +3248,8 @@ declare class WebContextMenuParam { * @returns { string } Returns the text of the selection, or return null if no text is selected. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSelectionText(): string; @@ -3176,7 +3266,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuSourceType } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceType(): ContextMenuSourceType; @@ -3193,7 +3284,8 @@ declare class WebContextMenuParam { * @returns { ContextMenuInputFieldType } Input field type if the context menu was invoked on an input field. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getInputFieldType(): ContextMenuInputFieldType; @@ -3210,7 +3302,8 @@ declare class WebContextMenuParam { * @returns { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isEditable(): boolean; @@ -3227,7 +3320,8 @@ declare class WebContextMenuParam { * @returns { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getEditStateFlags(): number; @@ -3236,7 +3330,8 @@ declare class WebContextMenuParam { * * @returns { number } The preview menu width. * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewWidth(): number; @@ -3245,7 +3340,8 @@ declare class WebContextMenuParam { * * @returns { number } The preview menu height. * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ getPreviewHeight(): number; } @@ -3261,7 +3357,8 @@ declare class WebContextMenuParam { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebContextMenuResult { /** @@ -3275,7 +3372,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3292,7 +3390,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ closeContextMenu(): void; @@ -3309,7 +3408,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyImage(): void; @@ -3324,7 +3424,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copy(): void; @@ -3343,7 +3444,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ paste(): void; @@ -3358,7 +3460,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ cut(): void; @@ -3373,7 +3476,8 @@ declare class WebContextMenuResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ selectAll(): void; @@ -3396,6 +3500,10 @@ declare class WebContextMenuResult { /** * Executes the paste and match style operation related to this context menu. * + *

API Note:
+ * Permissions need to be configured: ohos.permission.READ_PASTEBOARD. + *

+ * * @syscap SystemCapability.Web.Webview.Core * @since 20 */ @@ -3414,7 +3522,8 @@ declare class WebContextMenuResult { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class ConsoleMessage { /** @@ -3443,7 +3552,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3561,7 +3671,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceRequest { /** @@ -3583,7 +3694,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3756,7 +3868,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceResponse { /** @@ -3771,7 +3884,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -4327,7 +4441,8 @@ declare class WebResourceError { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class JsGeolocation { /** @@ -4342,7 +4457,8 @@ declare class JsGeolocation { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -4369,7 +4485,8 @@ declare class JsGeolocation { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ invoke(origin: string, allow: boolean, retain: boolean): void; } @@ -4446,7 +4563,7 @@ declare class EventResult { constructor(); /** - * Set whether the event is consumed. + * Sets the gesture event consumption result. * * @param { boolean } result - Whether to consume the gesture event. * {@code true} Indicates the consumption of the gesture event. @@ -4478,9 +4595,15 @@ declare class EventResult { /** * Sets the mouse event consumption result. * - * @param { boolean } result - True if the event is consumed. - * @param { boolean } [stopPropagation] - {@code true} means to prevent mouse events from bubbling up - * {code false} otherwise, The default value is true. + * @param { boolean } result - Whether to consume the mouse event. + * {@code true} Indicates the consumption of the mouse event. + * {@code false} Indicates the non-consumption of the mouse event. + * Default value: true. + * @param { boolean } [stopPropagation] - Whether to stop propagation. + * This parameter is valid only when result is set to true. + * {@code true} Indicates stops the propagation of events farther along. + * {@code false} Indicates the propagation of events farther along. + * Default value: true. * @syscap SystemCapability.Web.Webview.Core * @since 20 */ @@ -4748,7 +4871,8 @@ declare class WebController { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebOptions { /** @@ -4777,7 +4901,8 @@ declare interface WebOptions { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src: string | Resource; @@ -4815,6 +4940,17 @@ declare interface WebOptions { */ controller: WebController | WebviewController; + /** + * Sets the controller of the Web. + * + * @type { WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + controller: WebviewController; + /** * Rendering mode. * RenderMode.ASYNC_RENDER (default, cannot be dynamically adjusted): The Web component is rendered asynchronously. @@ -4823,7 +4959,8 @@ declare interface WebOptions { * @type { ?RenderMode } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ renderMode? : RenderMode; @@ -4846,7 +4983,8 @@ declare interface WebOptions { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ incognitoMode? : boolean; @@ -4859,7 +4997,8 @@ declare interface WebOptions { * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sharedRenderProcessToken? : string; } @@ -5037,7 +5176,8 @@ declare interface IntelligentTrackingPreventionDetails { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface WebInterface { /** @@ -5065,7 +5205,8 @@ interface WebInterface { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ (value: WebOptions): WebAttribute; } @@ -5098,7 +5239,7 @@ declare interface NativeEmbedInfo { id?: string; /** - * Only when enableEmbedMode is true and type is marked as native/xxx will be recognized as a same layer component. + * Type of the same-layer tag. The value is in lowercase. * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core @@ -5118,7 +5259,8 @@ declare interface NativeEmbedInfo { src?: string; /** - * The coordinate position of embed element relative to the webComponent. + * Position of the same-layer tag relative to the Web component in the screen coordinate system, + * which is different from the standard Position. The unit is px. * * @type { ?Position } * @syscap SystemCapability.Web.Webview.Core @@ -5128,7 +5270,7 @@ declare interface NativeEmbedInfo { position?: Position; /** - * The embed tag width. + * The embed tag width, in px. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5138,7 +5280,7 @@ declare interface NativeEmbedInfo { width?: number; /** - * The embed tag height. + * The embed tag height, in px. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5158,7 +5300,7 @@ declare interface NativeEmbedInfo { url?: string; /** - * The embed tag name. + * The embed tag name, which is in uppercase. * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core @@ -5168,7 +5310,8 @@ declare interface NativeEmbedInfo { tag?: string; /** - * The embed param list information used by object tag. + * List of key-value pairs contained in the object tag that form a map of the Object type. + * Use the methods provided by the Object type, such as embed.info?.param?.["name"] to operate the map object. * * @type { ?Map } * @syscap SystemCapability.Web.Webview.Core @@ -5187,7 +5330,7 @@ declare interface NativeEmbedInfo { * @since 11 */ /** - * Defines the Embed Data info. + * Provides detailed information about the changes of the same-layer tag lifecycle. * * @typedef NativeEmbedDataInfo * @syscap SystemCapability.Web.Webview.Core @@ -5196,7 +5339,7 @@ declare interface NativeEmbedInfo { */ declare interface NativeEmbedDataInfo { /** - * The embed status. + * Lifecycle status of the same-layer tag. * * @type { ?NativeEmbedStatus } * @syscap SystemCapability.Web.Webview.Core @@ -5206,7 +5349,7 @@ declare interface NativeEmbedDataInfo { status?: NativeEmbedStatus; /** - * The surface id. + * Psurfaceid of the NativeImage. * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core @@ -5216,7 +5359,7 @@ declare interface NativeEmbedDataInfo { surfaceId?: string; /** - * The embed id. + * Unique id of the same-layer tag. * * @type { ?string } * @syscap SystemCapability.Web.Webview.Core @@ -5226,7 +5369,7 @@ declare interface NativeEmbedDataInfo { embedId?: string; /** - * The embed info. + * Detailed information about the same-layer tag. * * @type { ?NativeEmbedInfo } * @syscap SystemCapability.Web.Webview.Core @@ -5237,7 +5380,7 @@ declare interface NativeEmbedDataInfo { } /** - * Defines the Embed Visibility info. + * Provides visibility information about the same-layer tag. * * @typedef NativeEmbedVisibilityInfo * @syscap SystemCapability.Web.Webview.Core @@ -5245,7 +5388,8 @@ declare interface NativeEmbedDataInfo { */ declare interface NativeEmbedVisibilityInfo { /** - * The embed visibility. + * Whether the same-layer tag is visible. + * The value true indicates that the same-layer tag is visible, and false indicates the opposite. * * @type { boolean } * @syscap SystemCapability.Web.Webview.Core @@ -5254,7 +5398,7 @@ declare interface NativeEmbedVisibilityInfo { visibility: boolean; /** - * The embed id. + * ID of the same-layer rendered tag. * * @type { string } * @syscap SystemCapability.Web.Webview.Core @@ -5272,7 +5416,7 @@ declare interface NativeEmbedVisibilityInfo { * @since 11 */ /** - * Defines the user touch info. + * Provides touch information of the same-layer tag. * * @typedef NativeEmbedTouchInfo * @syscap SystemCapability.Web.Webview.Core @@ -5291,7 +5435,7 @@ declare interface NativeEmbedTouchInfo { embedId?: string; /** - * An event sent when the state of contacts with a touch-sensitive surface changes. + * Touch action information. * * @type { ?TouchEvent } * @syscap SystemCapability.Web.Webview.Core @@ -5301,7 +5445,7 @@ declare interface NativeEmbedTouchInfo { touchEvent?: TouchEvent; /** - * Handle the user's touch result. + * Gesture event consumption result. * * @type { ?EventResult } * @syscap SystemCapability.Web.Webview.Core @@ -5348,7 +5492,7 @@ declare interface NativeEmbedMouseInfo { } /** - * Defines the first content paint rendering of web page. + * Provides detailed information about the first meaningful paint. * * @typedef FirstMeaningfulPaint * @syscap SystemCapability.Web.Webview.Core @@ -5357,7 +5501,7 @@ declare interface NativeEmbedMouseInfo { */ declare interface FirstMeaningfulPaint { /** - * Start time of navigation. + * Start time of navigation, in microseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5367,7 +5511,7 @@ declare interface FirstMeaningfulPaint { navigationStartTime?: number; /** - * Paint time of first meaningful content. + * Paint time of first meaningful content, in milliseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5387,7 +5531,7 @@ declare interface FirstMeaningfulPaint { */ declare interface LargestContentfulPaint { /** - * Start time of navigation. + * Start time of navigation, in microseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5397,7 +5541,7 @@ declare interface LargestContentfulPaint { navigationStartTime?: number; /** - * Paint time of largest image. + * Paint time of largest image, in milliseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5407,7 +5551,7 @@ declare interface LargestContentfulPaint { largestImagePaintTime?: number; /** - * Paint time of largest text. + * Paint time of largest text, in milliseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5417,7 +5561,7 @@ declare interface LargestContentfulPaint { largestTextPaintTime?: number; /** - * Bits per pixel of image. + * Bits per pixel of image, in milliseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5427,7 +5571,7 @@ declare interface LargestContentfulPaint { imageBPP?: number; /** - * Load start time of largest image. + * Load start time of largest image, in milliseconds. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5437,7 +5581,7 @@ declare interface LargestContentfulPaint { largestImageLoadStartTime?: number; /** - * Load end time of largest image. + * Number of pixels of the maximum image. * * @type { ?number } * @syscap SystemCapability.Web.Webview.Core @@ -5490,7 +5634,8 @@ declare interface RenderProcessNotRespondingData { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageEndEvent { /** @@ -5500,7 +5645,8 @@ declare interface OnPageEndEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -5512,7 +5658,8 @@ declare interface OnPageEndEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageBeginEvent { /** @@ -5522,7 +5669,8 @@ declare interface OnPageBeginEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -5570,7 +5718,8 @@ declare interface OnLoadFinishedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnProgressChangeEvent { /** @@ -5580,7 +5729,8 @@ declare interface OnProgressChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ newProgress: number; } @@ -5609,7 +5759,7 @@ declare interface OnTitleReceiveEvent { /** * Mark the source of the title. If it is true, the title is derived from the H5 title element; * If it is false, it is calculated from the URL. By default, it is calculated from the URL. - * + * * @type { ?boolean } * @syscap SystemCapability.Web.Webview.Core * @since 20 @@ -5624,7 +5774,8 @@ declare interface OnTitleReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnGeolocationShowEvent { /** @@ -5634,7 +5785,8 @@ declare interface OnGeolocationShowEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ origin: string; @@ -5645,7 +5797,8 @@ declare interface OnGeolocationShowEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ geolocation: JsGeolocation; } @@ -5787,7 +5940,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnConfirmEvent { /** @@ -5797,7 +5951,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5808,7 +5963,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5819,7 +5975,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -5831,7 +5988,8 @@ declare interface OnConfirmEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPromptEvent { /** @@ -5841,7 +5999,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5852,7 +6011,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5863,7 +6023,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ value: string; @@ -5874,7 +6035,8 @@ declare interface OnPromptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -6125,7 +6287,8 @@ declare interface OnRenderExitedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnShowFileSelectorEvent { /** @@ -6135,7 +6298,8 @@ declare interface OnShowFileSelectorEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: FileSelectorResult; @@ -6146,7 +6310,8 @@ declare interface OnShowFileSelectorEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fileSelector: FileSelectorParam; } @@ -6276,7 +6441,8 @@ declare interface OnInterceptRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPermissionRequestEvent { /** @@ -6286,7 +6452,8 @@ declare interface OnPermissionRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: PermissionRequest; } @@ -6298,7 +6465,8 @@ declare interface OnPermissionRequestEvent { * @typedef OnScreenCaptureRequestEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScreenCaptureRequestEvent { /** @@ -6307,7 +6475,8 @@ declare interface OnScreenCaptureRequestEvent { * @type { ScreenCaptureHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: ScreenCaptureHandler; } @@ -6318,7 +6487,8 @@ declare interface OnScreenCaptureRequestEvent { * @typedef OnContextMenuShowEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnContextMenuShowEvent { /** @@ -6327,7 +6497,8 @@ declare interface OnContextMenuShowEvent { * @type { WebContextMenuParam } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ param: WebContextMenuParam; @@ -6337,7 +6508,8 @@ declare interface OnContextMenuShowEvent { * @type { WebContextMenuResult } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: WebContextMenuResult; } @@ -6393,7 +6565,7 @@ declare interface OnSearchResultReceiveEvent { */ declare interface OnScrollEvent { /** - * The X offset of the scroll. + * The X offset of the scroll. Unit: vp. * * @type { number } * @syscap SystemCapability.Web.Webview.Core @@ -6404,7 +6576,7 @@ declare interface OnScrollEvent { xOffset: number; /** - * The Y offset of the scroll. + * The Y offset of the scroll. Unit: vp. * * @type { number } * @syscap SystemCapability.Web.Webview.Core @@ -6621,7 +6793,8 @@ declare interface OnFaviconReceivedEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnPageVisibleEvent { /** @@ -6631,7 +6804,8 @@ declare interface OnPageVisibleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; } @@ -6713,7 +6887,8 @@ declare interface OnFirstContentfulPaintEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnLoadInterceptEvent { /** @@ -6760,6 +6935,52 @@ declare interface OnOverScrollEvent { yOffset: number; } +/** + * Defines the function Triggered when the PDF page scrolling. + * + * @typedef OnPdfScrollEvent + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ +declare interface OnPdfScrollEvent { + + /** + * PDF page url. + * + * @type { string } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + url:string; +} + +/** + * Defines the function Triggered when the PDF load. + * + * @typedef OnPdfLoadEvent + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ +declare interface OnPdfLoadEvent { + /** + * The PDF page load result. + * + * @type { PdfLoadResult } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + result: PdfLoadResult; + + /** + * The PDF page url. + * + * @type { string } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + url: string; +} + /** * Defines the JavaScript object to be injected. * @@ -6949,7 +7170,16 @@ declare enum WebElementType { * @syscap SystemCapability.Web.Webview.Core * @since 20 */ - LINK = 2 + LINK = 2, + + /** + * Text,corresponding textSpan type. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 21 + * @arkts 1.1&1.2 + */ + TEXT = 3 } /** @@ -6966,7 +7196,16 @@ declare enum WebResponseType { * @syscap SystemCapability.Web.Webview.Core * @since 13 */ - LONG_PRESS = 1 + LONG_PRESS = 1, + + /** + * Right click. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 21 + * @arkts 1.1&1.2 + */ + RIGHT_CLICK = 2 } /** @@ -7012,6 +7251,56 @@ declare enum AudioSessionType { AMBIENT=3 } +/** + * PDF page load result + * + * @enum { number } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ +declare enum PdfLoadResult { + + /** + * The PDF page load success. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + LOAD_SUCCESS = 0, + + /** + * The error code for web load PDF file failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + PARSE_ERROR_FILE = 1, + + /** + * The error code for the PDF format is not support. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + PARSE_ERROR_FORMAT = 2, + + /** + * The error code for the PDF password is wrong. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + PARSE_ERROR_PASSWORD = 3, + + /** + * The error code for the PDF handler process failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + PARSE_ERROR_HANDLER = 4 +} + /** * Defines the options of preview menu * @@ -7022,8 +7311,10 @@ declare enum AudioSessionType { declare interface PreviewMenuOptions { /** * Defines the haptic feedback mode of preview menu. + * To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission. * * @type { ?HapticFeedbackMode } + * @default HapticFeedbackMode.DISABLED * @syscap SystemCapability.Web.Webview.Core * @since 20 */ @@ -7082,6 +7373,26 @@ declare interface SelectionMenuOptionsExt { * @since 20 */ previewMenuOptions?: PreviewMenuOptions; + + /** + * Callback function when the selection is displayed. + * + * @type { ?Callback } + * @syscap SystemCapability.Web.Webview.Core + * @since 21 + * @arkts 1.1&1.2 + */ + onMenuShow?: Callback; + + /** + * Callback function when the selection menu is hidden. + * + * @type { ?Callback } + * @syscap SystemCapability.Web.Webview.Core + * @since 21 + * @arkts 1.1&1.2 + */ + onMenuHide?: Callback; } /** @@ -7106,7 +7417,8 @@ declare interface SelectionMenuOptionsExt { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebAttribute extends CommonMethod { /** @@ -7137,7 +7449,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ javaScriptAccess(javaScriptAccess: boolean): WebAttribute; @@ -7361,7 +7674,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ geolocationAccess(geolocationAccess: boolean): WebAttribute; @@ -7631,7 +7945,7 @@ declare class WebAttribute extends CommonMethod { /** * Sets the ratio of the text zoom. * - * @param { number } textZoomRatio The ratio of the text zoom. The default value is 100, ranging from 1 to +∞. + * @param { number } textZoomRatio Text zoom ratio to set. The value is an integer. The value range is (0, 2147483647]. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -7639,7 +7953,7 @@ declare class WebAttribute extends CommonMethod { /** * Sets the ratio of the text zoom. * - * @param { number } textZoomRatio The ratio of the text zoom. The default value is 100, ranging from 1 to +∞. + * @param { number } textZoomRatio Text zoom ratio to set. The value is an integer. The value range is (0, 2147483647]. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -7666,7 +7980,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ databaseAccess(databaseAccess: boolean): WebAttribute; @@ -7720,12 +8035,10 @@ declare class WebAttribute extends CommonMethod { *

* * @param { boolean } enabled Whether the viewport property of the meta tag is enabled. - * {@code true} means support the viewport attribute of the meta tag, - * the viewport property of the meta tag is not enabled. - * This means that the property will not be parsed and a default layout will be used.; - * {@code false} means not support the viewport attribute of the meta tag, - * the viewport property of the meta tag is enabled. - * This means that the property will be parsed and used for the layout. + * {@code true} means support the viewport attribute of the meta tag is enabled and parsed, + * and the layout is performed based on the viewport attribute. + * {@code false} means not support the viewport attribute of the meta tag is disabled and not parsed, + * and the default layout is used. * Default value: true. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core @@ -7773,7 +8086,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageEnd(callback: Callback): WebAttribute; @@ -7813,7 +8127,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageBegin(callback: Callback): WebAttribute; @@ -7874,7 +8189,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onProgressChange(callback: Callback): WebAttribute; @@ -7927,7 +8243,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onGeolocationHide(callback: () => void): WebAttribute; @@ -7957,7 +8274,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onGeolocationShow(callback: Callback): WebAttribute; @@ -8081,7 +8399,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfirm(callback: Callback): WebAttribute; @@ -8114,7 +8433,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPrompt(callback: Callback): WebAttribute; @@ -8219,6 +8539,20 @@ declare class WebAttribute extends CommonMethod { */ onHttpErrorReceive(callback: Callback): WebAttribute; + /** + * Triggered when the web page's document resource error. + *

API Note:
+ * This only triggered for main frame. + *

+ * + * @param { OnOverrideErrorPageCallback } callback The triggered function when the + * web page's document resource error. + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + onOverrideErrorPage(callback: OnOverrideErrorPageCallback): WebAttribute; + /** * Triggered when starting to download. * @@ -8373,7 +8707,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onShowFileSelector(callback: Callback): WebAttribute; @@ -8612,7 +8947,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPermissionRequest(callback: Callback): WebAttribute; @@ -8640,7 +8976,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onScreenCaptureRequest(callback: Callback): WebAttribute; @@ -8670,7 +9007,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } If custom display return true.Otherwise, default display return false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onContextMenuShow(callback: Callback): WebAttribute; @@ -8704,7 +9042,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ mediaPlayGestureAccess(access: boolean): WebAttribute; @@ -8740,17 +9079,39 @@ declare class WebAttribute extends CommonMethod { onSearchResultReceive(callback: Callback): WebAttribute; /** - * Triggered when the scroll bar slides to the specified position. + * Notify the global scroll position of the web page + * + * Description: * - * @param { function } callback Function Triggered when the scroll bar slides to the specified position. + * What is notified is the global scroll position of the page. + * Changes in the local scroll position cannot trigger this callback. + * + * Determine whether the page is globally scrolled and print window.pagYOffset + * or window.pagXOffset before and after scrolling. + * + * If it is global scrolling, the value of window.pagYOffset + * or window.pagXOffset will change before and after scrolling, and vice versa. + * + * @param { function } callback Function triggered when the web page scroll to the specified position. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 */ /** - * Triggered when the scroll bar slides to the specified position. + * Notify the global scroll position of the web page + * + * Description: + * + * What is notified is the global scroll position of the page. + * Changes in the local scroll position cannot trigger this callback. + * + * Determine whether the page is globally scrolled and print window.pagYOffset + * or window.pagXOffset before and after scrolling. * - * @param { function } callback Function Triggered when the scroll bar slides to the specified position. + * If it is global scrolling, the value of window.pagYOffset + * or window.pagXOffset will change before and after scrolling, and vice versa. + * + * @param { function } callback Function triggered when the web page scroll to the specified position. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -8758,9 +9119,20 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Triggered when the scroll bar slides to the specified position. + * Notify the global scroll position of the web page + * + * Description: + * + * What is notified is the global scroll position of the page. + * Changes in the local scroll position cannot trigger this callback. + * + * Determine whether the page is globally scrolled and print window.pagYOffset + * or window.pagXOffset before and after scrolling. + * + * If it is global scrolling, the value of window.pagYOffset + * or window.pagXOffset will change before and after scrolling, and vice versa. * - * @param { Callback } callback Function Triggered when the scroll bar slides to the specified position. + * @param { Callback } callback Function triggered when the web page scroll to the specified position. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -8966,10 +9338,10 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ /** - * Sets the standard font family for the web page. + * Sets a serif font family for the web page. * - * @param { string } family Sets the standard font family for the web page. - * Default value: sans-serif. + * @param { string } family Serif font family to set. + * Default value: serif. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9066,7 +9438,7 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ /** - * Sets the default font size for the web page. + * Sets the default fixed font size for the web page. * * @param { number } size Default fixed font size to set, in px. * The value ranges from -2^31 to 2^31-1. In actual rendering, @@ -9157,9 +9529,13 @@ declare class WebAttribute extends CommonMethod { defaultTextEncodingFormat(textEncodingFormat: string): WebAttribute; /** - * Whether force display the scroll bar. + * Set whether the scroll bar is permanent. In the resident state, + * when the page size exceeds one page, the scroll bar appears and does not disappear. + * + * Scroll bar resident is not supported in full expansion mode, + * that is, when layoutMode is WebLayoutMode.FIT_CONTENT mode, the parameter enabled is false. * - * @param { boolean } enabled {@code true} means show; {@code false} otherwise. + * @param { boolean } enabled {@code true} means show; {@code false} otherwise. default is false. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9341,7 +9717,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onPageVisible(callback: Callback): WebAttribute; @@ -9492,9 +9869,9 @@ declare class WebAttribute extends CommonMethod { onFirstContentfulPaint(callback: Callback): WebAttribute; /** - * Called when the First rendering of meaningful content time(FMP) + * Triggered when the first meaningful paint occurs on the web page. * - * @param { OnFirstMeaningfulPaintCallback } callback Function Triggered when the firstMeaningfulPaint. + * @param { OnFirstMeaningfulPaintCallback } callback Callback invoked when the First Meaningful Paint occurs on the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9503,9 +9880,9 @@ declare class WebAttribute extends CommonMethod { onFirstMeaningfulPaint(callback: OnFirstMeaningfulPaintCallback): WebAttribute; /** - * Called when the Maximum content rendering time(LCP). + * Triggered when the largest content paint occurs on the web page. * - * @param { OnLargestContentfulPaintCallback } callback Function Triggered when the largestContentfulPaint. + * @param { OnLargestContentfulPaintCallback } callback Callback invoked when the largest content paint occurs on the web page. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9539,7 +9916,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onLoadIntercept(callback: Callback): WebAttribute; @@ -9568,23 +9946,23 @@ declare class WebAttribute extends CommonMethod { onControllerAttached(callback: () => void): WebAttribute; /** - * Triggered when the over scrolling. - * @param { function } callback Function Triggered when the over scrolling. + * Triggered when the overscroll occurs. + * @param { function } callback Function triggered when the overscroll occurs. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 10 */ /** - * Triggered when the over scrolling. - * @param { function } callback Function Triggered when the over scrolling. + * Triggered when the overscroll occurs. + * @param { function } callback Function triggered when the overscroll occurs. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice * @since 11 */ /** - * Triggered when the over scrolling. - * @param { Callback } callback Function Triggered when the over scrolling. + * Triggered when the overscroll occurs. + * @param { Callback } callback Function triggered when the overscroll occurs. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9592,6 +9970,24 @@ declare class WebAttribute extends CommonMethod { */ onOverScroll(callback: Callback): WebAttribute; + /** + * Triggered when the PDF in web page scrolling at bottom with pdf scroll event. + * @param { Callback } callback Function Triggered when the scrolling to bottom. + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + onPdfScrollAtBottom(callback: Callback): WebAttribute; + + /** + * Triggered when the PDF page load finish. + * @param { Callback } callback + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + */ + onPdfLoadEvent(callback: Callback): WebAttribute; + /** * Called when received website security risk check result. * @@ -9681,7 +10077,7 @@ declare class WebAttribute extends CommonMethod { * - Frequent changes to the page width and height will trigger a re-layout of the Web component, * which can affect the user experience. * - Waterfall web pages are not supported (drop down to the bottom to load more). - * - Only height adaptation is supported(VH units are not supported). Width adaptation is not supported. + * - Only height adaptation is supported. Width adaptation is not supported. * - Because the height is adaptive to the web page height, * the component height cannot be changed by modifying the component height attribute. *

@@ -9730,7 +10126,7 @@ declare class WebAttribute extends CommonMethod { nestedScroll(value: NestedScrollOptions | NestedScrollOptionsExt): WebAttribute; /** - * Sets the enable native embed mode for web. + * Sets whether to enable the same-layer rendering feature. * *

API Note: * Performance Note: @@ -9738,7 +10134,8 @@ declare class WebAttribute extends CommonMethod { * see [Rendering Native Components on the Web Using Same-Layer Rendering]{@link https://developer.huawei.com/consumer/en/doc/best-practices/bpta-render-web-using-same-layer-render} *

* - * @param { boolean } mode - True if it needs to enable native embed mode. + * @param { boolean } mode - Whether to enable the same-layer rendering feature. + * The value true means to enable the same-layer rendering feature, and false means the opposite. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice @@ -9754,7 +10151,7 @@ declare class WebAttribute extends CommonMethod { * the ArkWeb kernel identifies the type as a non-same-layer tag.
* This API is also controlled by the enableNativeEmbedMode API and * does not take effect if same-layer rendering is not enabled. When this API is not used, - * the ArkWeb engine recognizes the embed tags with the "native/" prefix as same-layer tags. + * the ArkWeb kernel recognizes the embed tags with the "native/" prefix as same-layer tags. * * @param { string } tag - Tag name. * @param { string } type - Type of the tag, The kernel matches this parameter with a prefix. @@ -9783,14 +10180,14 @@ declare class WebAttribute extends CommonMethod { onNativeEmbedLifecycleChange(callback: (event: NativeEmbedDataInfo) => void): WebAttribute; /** - * Called when the visibility of a same-layer tag (such as an Embed tag or an Object tag) on a web page changes in the viewport. + * Called when the visibility of a same-layer tag (such as an embed tag or an object tag) on a web page changes in the viewport. * By default, the same-layer tag is invisible. If the rendering tag is visible when you access the page for the first time, * the callback is triggered; otherwise, it is not triggered. That is, if the same-layer tag changes from a non-zero value to 0 x 0, * the callback is triggered. If the rendering tag size changes from 0 x 0 to a non-zero value, the callback is not triggered. * If all the same-layer tags are invisible, they are reported as invisible. If all the same-layer rendering tags or part of them are visible, * they are reported as invisible. * - * @param { OnNativeEmbedVisibilityChangeCallback } callback - Callback triggered when embed visibility changes. + * @param { OnNativeEmbedVisibilityChangeCallback } callback - Callback invoked when the visibility of a same-layer tag changes. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -9849,6 +10246,17 @@ declare class WebAttribute extends CommonMethod { /** * Sets whether automatic text resizing is enabled. + * After the automatic text font size adjustment takes effect, + * the font size will be automatically increased to 16px~32px + * for text with too small font size to avoid the readability problem of + * small fonts due to the lack of mobile adaptation for devices with small screens (default viewport width < 980px). + * + *

API Note:
+ * Prerequisites for the automatic adjustment of text font size to take effect: + * 1.The device forms are: Phone, Tablet, Wearable, TV. + * 2.Web component viewport width < 980px. + * 3.The page text is large, and the font size * number of characters of the page text is ≥ 3920. + * 4.There is no metaViewport setting on the frontend, or no "width" and "initial-scale" attributes in the metaViewport setting. * * @param { boolean } textAutosizing - Whether automatic text resizing is enabled. * {@code true} means enable text autosizing; @@ -9944,7 +10352,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptKeyboardAttach(callback: WebKeyboardCallback): WebAttribute; @@ -9991,7 +10400,7 @@ declare class WebAttribute extends CommonMethod { * The number of menu items, as well as the content size and icon size of the menu, * should be consistent with the ArkUI Menu component. * The system-provided id enumeration values (TextMenuItemId) in the menu are only - * supportedfor CUT, COPY, PASTE, and SELECT_ALL in the web. + * supported for CUT, COPY, PASTE, SELECT_ALL, TRANSLATE, SEARCH and some AI menu in the web. * The textRange parameter in the onMenuItemClick function is meaningless in the web, * and the input value is -1. * @returns { WebAttribute } @@ -10003,6 +10412,10 @@ declare class WebAttribute extends CommonMethod { /** * Enable or disable haptic feedback. * + *

API Note:
+ * Permissions need to be configured: ohos.permission.VIBRATE. + *

+ * * @param { boolean } enabled - Default value is true, set false to disable haptic feedback. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core @@ -10048,6 +10461,7 @@ declare class WebAttribute extends CommonMethod { * Sets whether to enable AVSession for web pages. * * @param { boolean } enabled Whether to enable AVSession. The value true means to enable AVSession, and false means the opposite. + * False when passing in undefined and null. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 18 @@ -10150,6 +10564,19 @@ declare class WebAttribute extends CommonMethod { * @since 20 */ gestureFocusMode(mode: GestureFocusMode): WebAttribute; + + /** + * Set whether to comply with the zoom restrictions set by thetag in the webpage. + * + * @param { boolean } enable {@code true} means the Web will not comply with the zoom restrictions + * set by thetag on the webpage; {@code false} otherwise. + * The default value is false. + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 21 + * @arkts 1.1&1.2 + */ + forceEnableZoom(enable: boolean): WebAttribute; } /** @@ -10438,4 +10865,4 @@ declare enum GestureFocusMode { * @since 20 */ GESTURE_TAP_AND_LONG_PRESS = 1 -} \ No newline at end of file +} diff --git a/api/@internal/component/ets/window_scene.d.ts b/api/@internal/component/ets/window_scene.d.ts index 2505dfdb6eebf245e1056fa29e679556ca8b6ae6..032103b5187f7a1f71d7e0030ae7e7eaefeb4961 100644 --- a/api/@internal/component/ets/window_scene.d.ts +++ b/api/@internal/component/ets/window_scene.d.ts @@ -18,13 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Position } from './units' +import { CommonMethod } from './common' +/*** endif */ + /** * Defines the interface of WindowScene. * * @interface WindowSceneInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface WindowSceneInterface { /** @@ -34,7 +40,8 @@ interface WindowSceneInterface { * @returns { WindowSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (persistentId: number): WindowSceneAttribute; } @@ -45,7 +52,8 @@ interface WindowSceneInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare class WindowSceneAttribute extends CommonMethod { /** @@ -58,7 +66,8 @@ declare class WindowSceneAttribute extends CommonMethod { * @returns { WindowSceneAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ attractionEffect(destination: Position, fraction: number): WindowSceneAttribute; } diff --git a/api/@internal/component/ets/with_theme.d.ts b/api/@internal/component/ets/with_theme.d.ts index 2de31a46ac690350406b37cf98c9e0a22e9e0ce6..7d1f2ce37928f907c6b9e6de7ca722a14637655f 100644 --- a/api/@internal/component/ets/with_theme.d.ts +++ b/api/@internal/component/ets/with_theme.d.ts @@ -18,6 +18,10 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CustomTheme } from '../../@ohos.arkui.theme'; +import { ThemeColorMode } from './common'; +/*** endif */ /** * CustomTheme. @@ -37,7 +41,8 @@ declare type CustomTheme = import('../api/@ohos.arkui.theme').CustomTheme; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WithThemeOptions { /** @@ -47,7 +52,8 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ theme?: CustomTheme; @@ -58,7 +64,8 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colorMode?: ThemeColorMode; } @@ -82,7 +89,8 @@ declare type WithThemeInterface = (options: WithThemeOptions) => WithThemeAttrib * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since 12 +* @since arkts {'1.1':'12','1.2':'20'} +* @arkts 1.1&1.2 */ declare class WithThemeAttribute { } diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index c49c461306c743e3d4e427a355eb5de5c7529e38..422c84bc0c951bed4ec61f806ba0175985351843 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; +import { CommonMethod } from './common'; +import { XComponentType } from './enums'; +import { VoidCallback } from './units'; +/*** endif */ + /** * Describes the rectangle of the surface held by the XComponent. * @@ -33,7 +40,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SurfaceRect { /** @@ -53,7 +61,8 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ offsetX?: number; @@ -74,7 +83,8 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ offsetY?: number; @@ -94,7 +104,8 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceWidth: number; @@ -114,7 +125,8 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceHeight: number; } @@ -134,7 +146,8 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SurfaceRotationOptions { /** @@ -153,7 +166,8 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ lock?: boolean; } @@ -172,7 +186,8 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class XComponentController { /** @@ -187,7 +202,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -207,7 +223,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getXComponentSurfaceId(): string; @@ -229,7 +246,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getXComponentContext(): Object; @@ -264,7 +282,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ setXComponentSurfaceRect(rect: SurfaceRect): void; @@ -284,7 +303,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ getXComponentSurfaceRect(): SurfaceRect; @@ -304,7 +324,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; @@ -324,7 +345,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ getXComponentSurfaceRotation(): Required; @@ -344,7 +366,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ onSurfaceCreated(surfaceId: string): void; @@ -366,7 +389,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; @@ -386,7 +410,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ onSurfaceDestroyed(surfaceId: string): void; @@ -403,7 +428,8 @@ declare class XComponentController { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -413,7 +439,8 @@ declare class XComponentController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopImageAnalyzer(): void; @@ -454,7 +481,8 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface XComponentOptions { /** @@ -472,7 +500,8 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ type: XComponentType; @@ -492,7 +521,8 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ controller: XComponentController; @@ -503,7 +533,8 @@ declare interface XComponentOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ imageAIOptions?: ImageAIOptions; @@ -513,7 +544,8 @@ declare interface XComponentOptions { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ screenId?: number; } @@ -524,7 +556,8 @@ declare interface XComponentOptions { * @interface NativeXComponentParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeXComponentParameters { /** @@ -533,7 +566,8 @@ declare interface NativeXComponentParameters { * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ type: XComponentType; @@ -543,7 +577,8 @@ declare interface NativeXComponentParameters { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ imageAIOptions?: ImageAIOptions; } @@ -638,7 +673,8 @@ interface XComponentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare type OnNativeLoadCallback = (event?: object) => void; @@ -656,7 +692,8 @@ declare type OnNativeLoadCallback = (event?: object) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class XComponentAttribute extends CommonMethod { /** @@ -686,7 +723,8 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onLoad(callback: OnNativeLoadCallback): XComponentAttribute; @@ -717,7 +755,8 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ onDestroy(event: VoidCallback): XComponentAttribute; @@ -731,7 +770,8 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableAnalyzer(enable: boolean): XComponentAttribute; @@ -742,7 +782,8 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableSecure(isSecure: boolean): XComponentAttribute; @@ -763,6 +804,7 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ hdrBrightness(brightness: number): XComponentAttribute; @@ -773,7 +815,8 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableTransparentLayer(enabled: boolean): XComponentAttribute; } @@ -809,3 +852,109 @@ declare const XComponent: XComponentInterface; * @since 12 */ declare const XComponentInstance: XComponentAttribute; + +/** + * Defines the XComponent parameter interface. + * + * @interface XComponentParameter + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface XComponentParameter { + /** + * The id of xcomponent + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + id: string; + /** + * The type of xcomponent + * + * @type { XComponentType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type: XComponentType; + /** + * The name of the dynamic library compiled and output by the native layer. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + libraryname?: string; + /** + * The controller of xcomponent. + * + * @type { ?XComponentController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + controller?: XComponentController; +} + +/** + * Defines XComponent. + * + * @interface XComponentInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +interface XComponentInterface { + /** + * Constructor parameters + * + * @param { XComponentParameter } value - Indicates the options of the xcomponent. + * @returns { XComponentAttribute } The attribute of the xcomponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (value: XComponentParameter): XComponentAttribute; + + /** + * Constructor parameters + * + * @param { XComponentOptions } options - Indicates the options of the xcomponent. + * @returns { XComponentAttribute } The attribute of the xcomponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (options: XComponentOptions): XComponentAttribute; + + /** + * Constructor parameters + * + * @param { NativeXComponentParameters } params - Indicates the constructor parameters of the xcomponent for native developing. + * @returns { XComponentAttribute } The attribute of the xcomponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + (params: NativeXComponentParameters): XComponentAttribute; +} \ No newline at end of file diff --git a/api/@internal/ets/global.d.ts b/api/@internal/ets/global.d.ts index 3606e6f958113740ea3c228beacebfbe8d49a5f9..22701c9e4cd736756b59f23bd735a674b3404236 100644 --- a/api/@internal/ets/global.d.ts +++ b/api/@internal/ets/global.d.ts @@ -751,28 +751,6 @@ export declare function clearTimeout(timeoutID?: number): void; */ export declare function canIUse(syscap: string): boolean; -/** - * determine whether the current operating system version is greater than or equal to the given value. - * - * @param { string } apiVersion - Only major version can be passed in, such as "20"; - * major and minor version can be passed in, such as "20.1"; major minor and patch - * version can be passed in, such as "20.1.2" - * @returns { boolean } true - operating system version is greater than or equal to the given value - * false - operating system version is less than the given value or invalid api version - * @syscap SystemCapability.Startup.SystemInfo - * @crossplatform - * @atomicservice - * @since 20 - * @example - * if (isApiVersionGreaterOrEqual("20.1")) { - * // Use 20.1 APIs. - * } else { - * // Alternative code for earlier versions. - * } - * - */ -export declare function isApiVersionGreaterOrEqual(apiVersion: string): boolean; - /** * Obtains all attributes of the component with the specified ID. * diff --git a/api/@ohos.PiPWindow.d.ts b/api/@ohos.PiPWindow.d.ts index 206fc082fef20a9d2743812b3aae8673c5eb9ba6..7ed8033f3377114695523a55dce5ae7c0dd1c5b0 100644 --- a/api/@ohos.PiPWindow.d.ts +++ b/api/@ohos.PiPWindow.d.ts @@ -93,7 +93,7 @@ declare namespace PiPWindow { * @param { PiPConfiguration } config - Params for picture-in-picture controller creation. The config must be valid, * the context and componentController in config should not be null. If templateType is specified, make sure * it's type of PiPTemplateType. If controlGroups is specified, make sure it correspond to the templateType. - * @param { typeNode.XComponent } contentNode - Params for picture-in-picture controller creation. + * @param { typeNode.XComponent } contentNode - Params for picture-in-picture controller creation. * Indicates the node which display the content of pip window. * @returns { Promise } - The promise returned by the function * @throws { BusinessError } 401 - Params error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -1059,7 +1059,7 @@ declare namespace PiPWindow { * @since 18 */ updateContentNode(contentNode: typeNode.XComponent): Promise; - + /** * Set Dashboard control enable status. * @param { PiPControlType } controlType - Describe picture-in-picture control type. @@ -1084,6 +1084,17 @@ declare namespace PiPWindow { */ getPiPWindowInfo(): Promise; + /** + * Get the PiP switch status of system setting. + * @returns { Promise } - The promise used to return the PIP switch status. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1300014 - PiP internal error. + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since 20 + */ + getPiPSettingSwitch(): Promise; + /** * Register picture-in-picture control event listener. * @param { 'stateChange' } type - Registration type, PiP lifecycle state change, 'stateChange' @@ -1197,7 +1208,6 @@ declare namespace PiPWindow { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300014 - PiP internal error. * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 15 diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 7ffdeef4a48152cce565178019ac00ed12167bd2..99d5b7167c7907485c657554ce75ab6a299ed5c1 100755 --- a/api/@ohos.UiTest.d.ts +++ b/api/@ohos.UiTest.d.ts @@ -20,17 +20,6 @@ import { Callback } from './@ohos.base'; -/** - * Used to initialize the uitest environment at the start of the test - * - * @throws { BusinessError } 17000001 - Initialization failed. - * @syscap SystemCapability.Test.UiTest - * @since 20 - * @arkts 1.2 - * @test -*/ -export function loadAndSetUpUiTest(): void {}; - /** * Enumerates the string value match pattern. * @@ -1130,7 +1119,8 @@ declare interface Point { * @type { ?number } * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ displayId?: number; } @@ -1822,8 +1812,9 @@ declare interface TouchPadSwipeOptions { * @interface InputTextMode * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ declare interface InputTextMode { /** @@ -1831,8 +1822,9 @@ declare interface InputTextMode { * @type { ?boolean } * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ paste?: boolean; @@ -1841,8 +1833,9 @@ declare interface InputTextMode { * @type { ?boolean } * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ addition?: boolean; } @@ -3059,8 +3052,9 @@ declare class Component { * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ inputText(text: string, mode: InputTextMode): Promise; @@ -3219,6 +3213,7 @@ declare class Component { * @arkts 1.1&1.2 */ getBounds(): Promise; + /** * Scroll on this {@link Component}to find matched {@link Component},applicable to scrollable one. * @@ -3390,8 +3385,6 @@ declare class Component { * @throws { BusinessError } 17000002 - The async function is not called with await. * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. * @syscap SystemCapability.Test.UiTest - * @crossplatform - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3450,7 +3443,6 @@ declare class Component { * @throws { BusinessError } 17000002 - The async function is not called with await. * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3526,6 +3518,7 @@ declare class Driver { * * @returns { Driver } the {@link Driver} object. * @throws { BusinessError } 17000001 - Initialization failed. + * @static * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice @@ -3619,7 +3612,6 @@ declare class Driver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3657,7 +3649,6 @@ declare class Driver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3698,7 +3689,6 @@ declare class Driver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3749,7 +3739,6 @@ declare class Driver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -3839,8 +3828,9 @@ declare class Driver { * @throws { BusinessError } 17000007 - Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ pressBack(displayId: number): Promise; @@ -3881,8 +3871,9 @@ declare class Driver { * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ triggerKey(keyCode: number, displayId: number): Promise; @@ -4381,8 +4372,9 @@ declare class Driver { * @throws { BusinessError } 17000007 - Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ getDisplaySize(displayId: number): Promise; @@ -4475,8 +4467,9 @@ declare class Driver { * @throws { BusinessError } 17000007 - Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ pressHome(displayId: number): Promise; @@ -4638,8 +4631,9 @@ declare class Driver { * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ fling(direction: UiDirection, speed: number, displayId: number): Promise; @@ -4938,8 +4932,9 @@ declare class Driver { * @throws { BusinessError } 17000002 - The async function is not called with await. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ inputText(p: Point, text: string, mode: InputTextMode): Promise; @@ -5499,6 +5494,7 @@ declare class PointerMatrix { * @param { number } steps - The number of steps of each finger trace, ranges from 1 to 1000. * @returns { PointerMatrix } the {@link PointerMatrix} object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. + * @static * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice @@ -5571,8 +5567,7 @@ declare const ON: On; UiComponent, UiDriver, BY, - By, - InputTextMode + By }; /*** endif */ @@ -5594,5 +5589,6 @@ export { MouseButton, UIElementInfo, UIEventObserver, - TouchPadSwipeOptions + TouchPadSwipeOptions, + InputTextMode }; diff --git a/api/@ohos.WorkSchedulerExtensionAbility.d.ts b/api/@ohos.WorkSchedulerExtensionAbility.d.ts index 7b64c003c98732a2f75785c8c8d290a642b3e913..0a25692c33baa13de11a37d1d88ac0b778868505 100644 --- a/api/@ohos.WorkSchedulerExtensionAbility.d.ts +++ b/api/@ohos.WorkSchedulerExtensionAbility.d.ts @@ -19,7 +19,7 @@ */ import workScheduler from './@ohos.resourceschedule.workScheduler'; -import { WorkSchedulerExtensionContext as _WorkSchedulerExtensionContext } from './application/WorkSchedulerExtensionContext'; +import _WorkSchedulerExtensionContext from './application/WorkSchedulerExtensionContext'; /** * The context of work scheduler extension. It allows access to @@ -36,10 +36,9 @@ export type WorkSchedulerExtensionContext = _WorkSchedulerExtensionContext; * Class of the work scheduler extension ability. * * @syscap SystemCapability.ResourceSchedule.WorkScheduler - * @StageModelOnly * @since 9 */ -export default class WorkSchedulerExtensionAbility { +declare class WorkSchedulerExtensionAbility { /** * Indicates work scheduler extension ability context. * @@ -70,3 +69,12 @@ export default class WorkSchedulerExtensionAbility { */ onWorkStop(work: workScheduler.WorkInfo): void; } + +/** + * Class of the work scheduler extension ability. + * + * @syscap SystemCapability.ResourceSchedule.WorkScheduler + * @StageModelOnly + * @since 9 + */ +export default WorkSchedulerExtensionAbility; \ No newline at end of file diff --git a/api/@ohos.abilityAccessCtrl.d.ets b/api/@ohos.abilityAccessCtrl.d.ets deleted file mode 100644 index 05dacc231c56e49af8f25b2415d7777e38a8a5c0..0000000000000000000000000000000000000000 --- a/api/@ohos.abilityAccessCtrl.d.ets +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file - * @kit AbilityKit - */ -import { AsyncCallback, Callback } from './@ohos.base'; -import { Permissions } from './permissions'; -import type _Context from './application/Context'; -import type _PermissionRequestResult from './security/PermissionRequestResult'; - -/** - * @namespace abilityAccessCtrl - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ -declare namespace abilityAccessCtrl { - /** - * Obtains the AtManager instance. - * - * @returns { AtManager } returns the instance of the AtManager. - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - function createAtManager(): AtManager; - - /** - * Provides methods for managing access_token. - * - * @interface AtManager - * @syscap SystemCapability.Security.AccessToken - * @atomicservice - * @since 20 - */ - interface AtManager { - /** - * Checks whether a specified application has been granted the given permission synchronously. - * - * @param { int } tokenID - Token ID of the application. - * @param { Permissions } permissionName - Name of the permission to be verified. - * @returns { GrantStatus } Returns permission verify result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256 characters. - * @syscap SystemCapability.Security.AccessToken - * @since 20 - */ - verifyAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; - - /** - * Checks whether a specified application has been granted the given permission. - * On the cross-platform, this function can be used to check the permission grant status for the current application only. - * - * @param { int } tokenID - Token ID of the application. - * @param { Permissions } permissionName - Name of the permission to be verified. - * @returns { Promise } Returns permission verify result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256 characters. - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - checkAccessToken(tokenID: int, permissionName: Permissions): Promise; - - /** - * Checks whether a specified application has been granted the given permission. - * On the cross-platform, this function can be used to check the permission grant status for the current application only. - * - * @param { int } tokenID - Token ID of the application. - * @param { Permissions } permissionName - Name of the permission to be verified. - * @returns { GrantStatus } Returns permission verify result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256 characters. - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - checkAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; - - /** - * Requests certain permissions from the user. - * - * @param { Context } context - The context that initiates the permission request. - *
The context must belong to the Stage model and only supports UIAbilityContext and UIExtensionContext. - * @param { Array } permissionList - Indicates the list of permissions to be requested. This parameter cannot be null or empty. - * @param { AsyncCallback } requestCallback Callback for the result from requesting permissions. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 12100001 - Invalid parameter. The context is invalid when it does not belong to the application itself. - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 20 - */ - requestPermissionsFromUser(context: Context, permissionList: Array, requestCallback: AsyncCallback): void; - - /** - * Requests certain permissions from the user. - * - * @param { Context } context - The context that initiates the permission request. - *
The context must belong to the Stage model and only supports UIAbilityContext and UIExtensionContext. - * @param { Array } permissionList - Indicates the list of permissions to be requested. This parameter cannot be null or empty. - * @returns { Promise } Returns result of requesting permissions. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 12100001 - Invalid parameter. The context is invalid when it does not belong to the application itself. - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 20 - */ - requestPermissionsFromUser(context: Context, permissionList: Array): Promise; - } - - /** - * GrantStatus. - * - * @enum { int } - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - export enum GrantStatus { - /** - * access_token permission check fail - * - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - PERMISSION_DENIED = -1, - - /** - * access_token permission check success - * - * @syscap SystemCapability.Security.AccessToken - * @crossplatform - * @atomicservice - * @since 20 - */ - PERMISSION_GRANTED = 0 - } -} -export default abilityAccessCtrl; -export { Permissions }; - -/** - * PermissionRequestResult interface. - * - * @typedef { _PermissionRequestResult } - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 20 - */ -export type PermissionRequestResult = _PermissionRequestResult; - -/** - * Context interface. - * - * @typedef { _Context } - * @syscap SystemCapability.Security.AccessToken - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 20 - */ -export type Context = _Context; diff --git a/api/@ohos.abilityAccessCtrl.d.ts b/api/@ohos.abilityAccessCtrl.d.ts index 120ed8b2b59e6beeaa9bda60f4eecb4e3918c50f..ecbcf98f4d575d7cf13b027a30e300728a1fa72d 100644 --- a/api/@ohos.abilityAccessCtrl.d.ts +++ b/api/@ohos.abilityAccessCtrl.d.ts @@ -39,7 +39,8 @@ import type _PermissionRequestResult from './security/PermissionRequestResult'; * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace abilityAccessCtrl { /** @@ -64,7 +65,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function createAtManager(): AtManager; @@ -81,19 +83,21 @@ declare namespace abilityAccessCtrl { * @interface AtManager * @syscap SystemCapability.Security.AccessToken * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AtManager { /** * Checks whether a specified application has been granted the given permission. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. The Permissions type supports only valid permission names. * @returns { Promise } Returns permission verify result. * @syscap SystemCapability.Security.AccessToken - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - verifyAccessToken(tokenID: number, permissionName: Permissions): Promise; + verifyAccessToken(tokenID: int, permissionName: Permissions): Promise; /** * Checks whether a specified application has been granted the given permission. @@ -111,20 +115,21 @@ declare namespace abilityAccessCtrl { /** * Checks whether a specified application has been granted the given permission synchronously. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256 characters. * @syscap SystemCapability.Security.AccessToken - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - verifyAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus; + verifyAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; /** * Checks whether a specified application has been granted the given permission. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -136,7 +141,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -149,7 +154,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { Promise } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -157,15 +162,16 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - checkAccessToken(tokenID: number, permissionName: Permissions): Promise; + checkAccessToken(tokenID: int, permissionName: Permissions): Promise; /** * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -178,7 +184,7 @@ declare namespace abilityAccessCtrl { * Checks whether a specified application has been granted the given permission. * On the cross-platform, this function can be used to check the permission grant status for the current application only. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be verified. * @returns { GrantStatus } Returns permission verify result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -186,9 +192,10 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - checkAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus; + checkAccessTokenSync(tokenID: int, permissionName: Permissions): GrantStatus; /** * Requests certain permissions from the user. @@ -230,7 +237,8 @@ declare namespace abilityAccessCtrl { * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionsFromUser( context: Context, @@ -278,7 +286,8 @@ declare namespace abilityAccessCtrl { * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionsFromUser(context: Context, permissionList: Array): Promise; @@ -546,7 +555,7 @@ declare namespace abilityAccessCtrl { * It should correspond to the value registered by function of "on", whose type is "permissionStateChange". * @param { Array } permissionList - A list of permissions that specify the permissions to be listened on. * It should correspond to the value registered by function of "on", whose type is "permissionStateChange". - * @param { Callback } callback - Callback for the result from unregistering permissions. + * @param { Callback } [callback] - Callback for the result from unregistering permissions. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.GET_SENSITIVE_PERMISSIONS". * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. @@ -571,7 +580,7 @@ declare namespace abilityAccessCtrl { * @param { 'selfPermissionStateChange' } type - Event type. * @param { Array } permissionList - A list of permissions that specify the permissions to be listened on. * It should correspond to the value registered by function of "on", whose type is "selfPermissionStateChange". - * @param { Callback } callback - Callback for the result from unregistering permissions. + * @param { Callback } [callback] - Callback for the result from unregistering permissions. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 12100001 - Invalid parameter. The permissionNames in the list are all invalid. * @throws { BusinessError } 12100004 - The API is not used in pair with 'on'. @@ -602,7 +611,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ requestPermissionOnSetting(context: Context, permissionList: Array): Promise>; @@ -656,14 +666,14 @@ declare namespace abilityAccessCtrl { /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @since 8 */ /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @crossplatform * @since 10 @@ -671,11 +681,12 @@ declare namespace abilityAccessCtrl { /** * GrantStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum GrantStatus { /** @@ -697,7 +708,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PERMISSION_DENIED = -1, /** @@ -719,7 +731,8 @@ declare namespace abilityAccessCtrl { * @syscap SystemCapability.Security.AccessToken * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ PERMISSION_GRANTED = 0 } @@ -925,7 +938,8 @@ export { Permissions }; * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PermissionRequestResult = _PermissionRequestResult; /** @@ -945,6 +959,7 @@ export type PermissionRequestResult = _PermissionRequestResult; * @stagemodelonly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type Context = _Context; diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index 1bd8be5a5ddd0f7764c2c77cc7347f29b34a1435..f3ccfb8953c1f3e28c9bc41bdbaaafa80b5d4ce5 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -27,7 +27,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * @namespace config * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace config { /** @@ -57,11 +58,13 @@ declare namespace config { /** * Indicates the configuration of high-contrast text. * + * @type { Config } * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - var highContrastText: Config; + let highContrastText: Config; /** * Indicates the configuration of invert color. * @@ -362,6 +365,7 @@ declare namespace config { * @param { boolean } state Indicates that whether trigger display magnification. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 9300007 - Trigger magnification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi @@ -375,7 +379,8 @@ declare namespace config { * @typedef Config * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Config { /** @@ -393,7 +398,8 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ set(value: T): Promise; @@ -412,7 +418,8 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ set(value: T, callback: AsyncCallback): void; @@ -425,7 +432,8 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ get(): Promise; @@ -436,7 +444,8 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ get(callback: AsyncCallback): void; diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts index e818965817b56fe0eead3133806d1e780340c262..4d5bfc600272b4a5f15d110f7c40ff687dc19d13 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -211,15 +211,6 @@ export enum AccessibilityAction { */ CONTROL_CENTER = 19, - /** - * Common - * - * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi - * @since 20 - */ - COMMON = 20, - /** * SpanClick * @@ -227,7 +218,7 @@ export enum AccessibilityAction { * @systemapi * @since 20 */ - SPAN_CLICK = 21 + SPAN_CLICK = 20 } @@ -1116,7 +1107,6 @@ declare namespace accessibility { * Checks screen reader ability (which is used by talkback) is enabled. * @returns { boolean } Returns true if the screen reader is enabled; return false otherwise. * @syscap SystemCapability.BarrierFree.Accessibility.Vision - * @atomicservice * @since 18 */ function isScreenReaderOpenSync(): boolean; @@ -1316,7 +1306,8 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'screenReaderStateChange', callback: Callback): void; @@ -1330,6 +1321,7 @@ declare namespace accessibility { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 20 + * @arkts 1.1&1.2 */ function on(type: 'touchModeChange', callback: Callback): void; @@ -1385,7 +1377,8 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'screenReaderStateChange', callback?: Callback): void; @@ -1399,6 +1392,7 @@ declare namespace accessibility { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 20 + * @arkts 1.1&1.2 */ function off(type: 'touchModeChange', callback?: Callback): void; @@ -1513,7 +1507,7 @@ declare namespace accessibility { * @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @since 8 */ - type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' | + type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' | 'monospacedSansSerif' | 'sansSerif' | 'casual' | 'cursive' | 'smallCapitals'; /** * Indicates the style of captions. @@ -1677,11 +1671,11 @@ declare namespace accessibility { /** * A constructor used to create a EventInfo object. * - * @param jsonObject - Character string in JSON format required for creating an object. + * @param { Object } jsonObject - Character string in JSON format required for creating an object. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 7 */ - constructor(jsonObject); + constructor(jsonObject: Object); /** * A constructor used to create a EventInfo object. * @@ -1733,8 +1727,7 @@ declare namespace accessibility { * The page id of the event source. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ pageId?: number; @@ -1787,8 +1780,7 @@ declare namespace accessibility { * The start index of listed items on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ beginIndex?: number; @@ -1796,8 +1788,7 @@ declare namespace accessibility { * The index of the current item on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ currentIndex?: number; @@ -1805,8 +1796,7 @@ declare namespace accessibility { * The end index of listed items on the screen. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ endIndex?: number; @@ -1814,8 +1804,7 @@ declare namespace accessibility { * The total of the items, talkback used it when scroll. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ itemCount?: number; @@ -1823,8 +1812,7 @@ declare namespace accessibility { * The id of element. * @type { ?number } * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ elementId?: number; diff --git a/api/@ohos.account.appAccount.d.ts b/api/@ohos.account.appAccount.d.ts index d814c3546f1dac2d7251f74f572a4eebfa5d610f..848d8efa235d2c5a5cf8e0422deec4d682798b20 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -2175,6 +2175,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 8 * @deprecated since 9 + * @useinstead appAccount.AuthTokenInfo.authType */ authType: string; @@ -2185,6 +2186,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 8 * @deprecated since 9 + * @useinstead appAccount.AuthTokenInfo.token */ token: string; } @@ -2798,6 +2800,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 8 * @deprecated since 9 + * @useinstead AppAccount.AuthCallback.onResult */ onResult: (code: number, result: { [key: string]: any }) => void; @@ -2808,6 +2811,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 8 * @deprecated since 9 + * @useinstead AppAccount.AuthCallback.onRequestRedirected */ onRequestRedirected: (request: Want) => void; } diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 1ad094694a3eaba5f3bc54147584c02da4b06cff..f114ba51a95de44cc302c8b59ba7ea1ad3073844 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -111,6 +111,21 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ + /** + * Gets the distributed information of the specified OS account. + * + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or (ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and + * ohos.permission.GET_DISTRIBUTED_ACCOUNTS) + * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { AsyncCallback } callback - Asynchronous callback interface. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - System service exception. + * @throws { BusinessError } 12300003 - Account not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + */ getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback): void; /** @@ -129,6 +144,21 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ + /** + * Gets the distributed information of the specified OS account. + * + * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or (ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and + * ohos.permission.GET_DISTRIBUTED_ACCOUNTS) + * @param { number } localId - Indicates the local ID of the specified OS account. + * @returns { Promise } The distributed information of the specified OS account. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - System service exception. + * @throws { BusinessError } 12300003 - Account not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + */ getOsAccountDistributedInfoByLocalId(localId: number): Promise; /** diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 662dd6b646ac892f76e29f6c3fe89d17a7a9dba7..47f30663c38d381481b2ed336ada418f2d2fc3a9 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -97,6 +97,35 @@ declare namespace osAccount { */ activateOsAccount(localId: number, callback: AsyncCallback): void; + /** + * Activates a specified OS account on the target display. + *

+ * If multiple OS accounts and displays are available, you can call this method to enable a + * specific OS account to run in the foreground on a target display. + * Currently, cross-display activation is not supported, which means that a foreground OS account + * cannot be activated from its original display to another display. + *

+ * + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION + * @param { number } localId - Indicates the local ID of the OS account. + * @param { number } displayId - Indicates the ID of the target display. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300003 - Account not found. + * @throws { BusinessError } 12300008 - Restricted Account. + * @throws { BusinessError } 12300010 - Service busy. Possible causes: The target account is being operated. + * @throws { BusinessError } 12300016 - The number of logged in accounts reaches the upper limit. + * @throws { BusinessError } 12300018 - Display not found. + * @throws { BusinessError } 12300019 - Cross-display activation not supported. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ + activateOsAccount(localId: number, displayId: number): Promise; + /** * Activates a specified OS account. *

@@ -1171,6 +1200,38 @@ declare namespace osAccount { */ getForegroundOsAccountLocalId(): Promise; + /** + * Gets the local ID of the foreground OS account by displayId. + * + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { number } displayId - Indicates the display ID of the target foreground OS account. + * @returns { Promise } Returns local ID of the target foreground OS account. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300017 - The foreground OS account is not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ + getForegroundOsAccountLocalId(displayId: number): Promise; + + /** + * Gets the disyplay ID of the foreground OS account by localId. + * + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { number } localId - Indicates the local ID of the target foreground OS account. + * @returns { Promise } Returns display ID of the target foreground OS account. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300017 - The foreground OS account is not found. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ + getForegroundOsAccountDisplayId(localId: number): Promise; + /** * Creates an OS account using the local name and account type. * @@ -1762,7 +1823,7 @@ declare namespace osAccount { *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @throws { BusinessError } 12300002 - Invalid serialNumber. - * @throws { BusinessError } 12300003 - The account indicated by serialNumber dose not exist. + * @throws { BusinessError } 12300003 - The account indicated by serialNumber does not exist. * @syscap SystemCapability.Account.OsAccount * @since 9 */ @@ -1777,7 +1838,7 @@ declare namespace osAccount { *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @throws { BusinessError } 12300002 - Invalid serialNumber. - * @throws { BusinessError } 12300003 - The account indicated by serialNumber dose not exist. + * @throws { BusinessError } 12300003 - The account indicated by serialNumber does not exist. * @syscap SystemCapability.Account.OsAccount * @since 9 */ @@ -1894,6 +1955,20 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ + /** + * Subscribes to the OS account switching event. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { 'switching' } type - Indicates the event type. + * @param { Callback } callback - Indicates the callback for getting the event data. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid type. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ on(type: 'switching', callback: Callback): void; /** @@ -1912,6 +1987,20 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ + /** + * Unsubscribes from the OS account switching event. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { 'switching' } type - Indicates the event type. + * @param { Callback } [callback] - Indicates the callback for getting the event data. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid type. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ off(type: 'switching', callback?: Callback): void; /** @@ -1930,6 +2019,20 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ + /** + * Subscribes to the OS account switched event. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { 'switched' } type - Indicates the event type. + * @param { Callback } callback - Indicates the callback for getting the event data. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid type. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ on(type: 'switched', callback: Callback): void; /** @@ -1948,6 +2051,20 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ + /** + * Unsubscribes from the OS account switched event. + * + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS + * @param { 'switched' } type - Indicates the event type. + * @param { Callback } [callback] - Indicates the callback for getting the event data. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid type. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 21 + */ off(type: 'switched', callback?: Callback): void; /** @@ -2294,6 +2411,16 @@ declare namespace osAccount { * @since 12 */ toAccountId: number; + + /** + * Indicates which display the switch event occurred on. + * + * @type { ?number } + * @syscap SystemCapability.Account.OsAccount + * @systemapi Hide this for inner system use. + * @since 21 + */ + displayId?: number; } /** diff --git a/api/@ohos.advertising.AdComponent.d.ets b/api/@ohos.advertising.AdComponent.d.ets index 30a5de77ade56b74f2c5c6826c78ea72ecfbdde4..f621673075da357da97d478e688a11d072558833 100644 --- a/api/@ohos.advertising.AdComponent.d.ets +++ b/api/@ohos.advertising.AdComponent.d.ets @@ -84,6 +84,13 @@ declare struct AdComponent { * @syscap SystemCapability.Advertising.Ads * @since 12 */ + /** + * The builder param to render customized ad content. + * @type { ?() => void } + * @syscap SystemCapability.Advertising.Ads + * @atomicservice + * @since 20 + */ @BuilderParam adRenderer?: () => void; /** @@ -92,6 +99,13 @@ declare struct AdComponent { * @syscap SystemCapability.Advertising.Ads * @since 15 */ + /** + * The property to control the playback status of the roll ad. + * @type { ?number } + * @syscap SystemCapability.Advertising.Ads + * @atomicservice + * @since 20 + */ @Prop rollPlayState?: number; /** diff --git a/api/@ohos.animator.d.ets b/api/@ohos.animator.d.ets deleted file mode 100644 index 6b2bb94ba046eb469d3b3ec26aea0408cbcfc818..0000000000000000000000000000000000000000 --- a/api/@ohos.animator.d.ets +++ /dev/null @@ -1,682 +0,0 @@ -/* - * Copyright (c) 2020-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -import { ExpectedFrameRateRange } from './arkui/component/common' - -/** - * Defines the animator options. - * @interface AnimatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the animator options. - * @interface AnimatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the animator options. - * @interface AnimatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export interface AnimatorOptions { - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - duration: number; - - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * interpolating-spring(velocity, mass, stiffness, damping), interpolating spring curve. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - easing: string; - - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - delay: number; - - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - fill: "none" | "forwards" | "backwards" | "both"; - - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; - - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - iterations: number; - - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - begin: number; - - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - end: number; -} - -/** - * Defines the Animator result interface. - * @interface AnimatorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the Animator result interface. - * @interface AnimatorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the Animator result interface. - * @interface AnimatorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export interface AnimatorResult { - /** - * Update the options for current animator. - * @param { AnimatorOptions } options - Options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - * @deprecated since 9 - * @useinstead ohos.animator.reset - */ - update(options: AnimatorOptions): void; - - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - reset(options: AnimatorOptions): void; - - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - play(): void; - - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - finish(): void; - - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pause(): void; - - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - cancel(): void; - - /** - * Plays the animation in reverse direction. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Plays the animation in reverse direction. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Plays the animation in reverse direction. - * Invalid when using interpolating-spring curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - reverse(): void; - - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onFrame - */ - onframe: (progress: number) => void; - - /** - * Trigger when vSync callback. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onFrame: (progress: number) => void; - - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onFinish - */ - onfinish: () => void; - - /** - * The animation is finished. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onFinish: () => void; - - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onCancel - */ - oncancel: () => void; - - /** - * The animation is canceled. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onCancel: () => void; - - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onRepeat - */ - onrepeat: () => void; - - /** - * The animation is repeated. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onRepeat: () => void; - - /** - * The expected frame rate of dynamical of rate range. - * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; -} - -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class Animator { - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - * @deprecated since 9 - * @useinstead ohos.animator.create - */ - static createAnimator(options: AnimatorOptions): AnimatorResult; - - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - static create(options: AnimatorOptions): AnimatorResult; -} \ No newline at end of file diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 296ec868c8fe17df89b1d98cdb927b1f1e069910..7b40c6e1ec838c62541ade25dc2380d6f1021b24 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { FillMode, PlayMode } from './arkui/component/enums'; +import { ExpectedFrameRateRange } from './arkui/component/common'; +/*** endif */ + /** * Defines the animator options. * @interface AnimatorOptions @@ -37,7 +42,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface AnimatorOptions { /** @@ -62,7 +68,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration: number; @@ -134,7 +141,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ easing: string; @@ -160,7 +168,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delay: number; @@ -189,7 +198,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ fill: "none" | "forwards" | "backwards" | "both"; @@ -215,7 +225,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; @@ -241,7 +252,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ iterations: number; @@ -267,7 +279,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ begin: number; @@ -293,7 +306,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ end: number; } @@ -304,7 +318,8 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class SimpleAnimatorOptions { /** @@ -315,7 +330,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(begin: number, end: number); @@ -327,7 +343,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ duration(duration: number): SimpleAnimatorOptions; @@ -353,7 +370,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ easing(curve: string): SimpleAnimatorOptions; @@ -365,7 +383,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ delay(delay: number): SimpleAnimatorOptions; @@ -377,7 +396,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fill(fillMode: FillMode): SimpleAnimatorOptions; @@ -389,7 +409,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ direction(direction: PlayMode): SimpleAnimatorOptions; @@ -401,7 +422,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ iterations(iterations: number): SimpleAnimatorOptions; } @@ -425,7 +447,8 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface AnimatorResult { /** @@ -472,7 +495,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reset(options: AnimatorOptions): void; @@ -487,7 +511,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ reset(options: AnimatorOptions | SimpleAnimatorOptions): void; @@ -507,7 +532,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ play(): void; @@ -527,7 +553,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ finish(): void; @@ -547,7 +574,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): void; @@ -567,7 +595,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cancel(): void; @@ -588,7 +617,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reverse(): void; @@ -621,7 +651,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFrame: (progress: number) => void; @@ -654,7 +685,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onFinish: () => void; @@ -687,7 +719,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onCancel: () => void; @@ -720,7 +753,8 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ onRepeat: () => void; @@ -729,7 +763,8 @@ export interface AnimatorResult { * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; } @@ -752,7 +787,15 @@ export interface AnimatorResult { * @atomicservice * @since 11 */ -export default class Animator { +/** + * Defines the Animator class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +declare class Animator { /** * Create an animator object for custom animation. * @param { AnimatorOptions } options - Options. @@ -815,7 +858,10 @@ export default class Animator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; } + +export default Animator; diff --git a/api/@ohos.app.ability.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts index 1f7273212581ebc63d42829b88f39347446b1b35..7cb205beed24e2286e4b9ffa2ae4071cc98ed116 100644 --- a/api/@ohos.app.ability.AbilityConstant.d.ts +++ b/api/@ohos.app.ability.AbilityConstant.d.ts @@ -172,7 +172,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ lastExitMessage: string; @@ -183,7 +184,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ lastExitDetailInfo?: LastExitDetailInfo; } @@ -195,7 +197,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface LastExitDetailInfo { /** @@ -205,7 +208,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ pid: number; @@ -216,7 +220,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ processName: string; @@ -227,7 +232,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uid: number; @@ -238,7 +244,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitSubReason: number; @@ -249,7 +256,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitMsg: string; @@ -260,7 +268,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ rss: number; @@ -271,7 +280,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ pss: number; @@ -282,7 +292,8 @@ declare namespace AbilityConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; @@ -475,6 +486,17 @@ declare namespace AbilityConstant { * @arkts 1.1&1.2 */ PREPARE_CONTINUATION = 10, + + /** + * Start by preload. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + PRELOAD = 11, } /** diff --git a/api/@ohos.app.ability.AtomicServiceOptions.d.ts b/api/@ohos.app.ability.AtomicServiceOptions.d.ts index 9168a95e277acd57828d82cda8ff058518f902e3..ed9c8f152617cf89f62e041ec8977d6c005276e3 100644 --- a/api/@ohos.app.ability.AtomicServiceOptions.d.ts +++ b/api/@ohos.app.ability.AtomicServiceOptions.d.ts @@ -18,6 +18,7 @@ * @kit AbilityKit */ +import CompletionHandlerForAtomicService from './@ohos.app.ability.CompletionHandlerForAtomicService'; import StartOptions from './@ohos.app.ability.StartOptions'; /** @@ -51,4 +52,16 @@ export default class AtomicServiceOptions extends StartOptions { * @since 12 */ parameters?: Record; + + /** + * The completion handler of openAtomicService. + * + * @type { ?CompletionHandlerForAtomicService } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + completionHandlerForAtomicService?: CompletionHandlerForAtomicService; } \ No newline at end of file diff --git a/api/@ohos.app.ability.ChildProcessOptions.d.ts b/api/@ohos.app.ability.ChildProcessOptions.d.ts index e1b13c5625c2ede7cb9485c07bb6bd5f8532d1b7..788ea729949a6cf45a00c696ad4a0f940f9603bd 100644 --- a/api/@ohos.app.ability.ChildProcessOptions.d.ts +++ b/api/@ohos.app.ability.ChildProcessOptions.d.ts @@ -28,7 +28,16 @@ */ export interface ChildProcessOptions { /** - * Whether the child process runs in an isolated environment. + * Controls whether the child process runs in an isolated data sandbox and network environment. + * + * - When `true`: + * - Child process runs in an independent data sandbox + * - Network access is disabled + * - Enables UID isolation functionality + * - When `false` (default): + * - Shares parent process's data sandbox + * - Inherits parent's network permissions + * - Disables UID isolation control * * @type { ?boolean } * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -36,4 +45,20 @@ export interface ChildProcessOptions { * @since 12 */ isolationMode?: boolean; + + /** + * Controls UID isolation for the child process, effective only when `isolationMode=true`. + * + * - When `true`: + * - Child process uses independent UID + * - When `false` (default): + * - Child process uses parent process's UID + * + * @type { ?boolean } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + isolationUid?: boolean; } \ No newline at end of file diff --git a/api/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts b/api/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..55a63623c76939de83f6b7cc87e050bb046718a1 --- /dev/null +++ b/api/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +/** + * Defines a onRequestSuccess function. + * + * @typedef {function} OnRequestSuccessFn + * @param { string } name - Indicates the full ability name or system operation name. + * If the result is a normal ability, the format is '[bundleName]#[moduleName]#[abilityName]'. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ +export type OnRequestSuccessFn = (name: string) => void; + +/** + * Defines a onRequestFailure function. + * + * @typedef {function} OnRequestFailureFn + * @param { string } name - Indicates the full ability name or system operation name. + * If the result is a normal ability, the format is '[bundleName]#[moduleName]#[abilityName]'. + * For some failure scenarios, the name may be empty. + * @param { AbilityStartFailureCode } failureCode - Indicates the failure code of startAbilityByType. + * @param { string } failureMessage - Indicates the failure message of startAbilityByType. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ +export type OnRequestFailureFn = (name: string, failureCode: AbilityStartFailureCode, failureMessage: string) => void; + +/** + * A handler to handle the completion events of startAbilityByType. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ +export class CompletionHandlerForAbilityStartCallback { + /** + * Notify the success result of startAbilityByType. + * + * @type { ?OnRequestSuccessFn } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + onRequestSuccess?: OnRequestSuccessFn; + + /** + * Notify the failure result of startAbilityByType. + * + * @type { ?OnRequestFailureFn } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + onRequestFailure?: OnRequestFailureFn; +} + +/** + * Specific failure codes indicating failure of startAbilityByType. + * + * @enum { int } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 +*/ +export enum AbilityStartFailureCode { + /** + * Indicates failed to startAbilityByType due to the system error, such as dialog crash, alloc memory failed. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + FAILURE_CODE_SYSTEM_MALFUNCTION = 0, + + /** + * Indicates the user cancelled the redirection. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + FAILURE_CODE_USER_CANCEL = 1, +} diff --git a/api/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts b/api/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b3acf8a0c6e6a45fcf4040d32933d9c6840cc82 --- /dev/null +++ b/api/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +/** + * Specific failure codes indicating failure to open atomicservice. + * + * @enum { number } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 +*/ +declare enum FailureCode { + /** + * Indicates fail to open atomicservice due to the system error, such as redirect dialog crash, alloc memory failed. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + FAILURE_CODE_SYSTEM_MALFUNCTION = 0, + + /** + * Indicates the user cancelled the redirection. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + FAILURE_CODE_USER_CANCEL = 1, + + /** + * Indicates the user refused the redirection. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + FAILURE_CODE_USER_REFUSE = 2, +} + +/** + * Notify the success result of openAtomicService. + * + * @typedef { function } + * @param { string } appId - Globally unique identifier of an atomicservice, which is allocated by the cloud. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 22 + * @arkts 1.2 + */ +type OnAtomicServiceRequestSuccessFn = (appId: string) => void; + +/** + * Notify the failure result of openAtomicService. + * + * @typedef { function } + * @param { string } appId - Globally unique identifier of an atomicservice, which is allocated by the cloud. + * @param { FailureCode } failureCode - Indicates the failure code for open atomic service. + * @param { string } failureMessage - Indicates the detail failure message for open atomic service. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 22 + * @arkts 1.2 + */ +type OnAtomicServiceRequestFailureFn = (appId: string, failureCode: FailureCode, failureMessage: string) => void; + +/** + * CompletionHandlerForAtomicService is a handler to handle the completion events of openAtomicService. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'20', '1.2':'22'} + * @arkts 1.1&1.2 + */ +declare class CompletionHandlerForAtomicService { + /** + * Notify the success result of openAtomicService. + * + * @param { string } appId - Globally unique identifier of an atomicservice, which is allocated by the cloud. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + */ + onAtomicServiceRequestSuccess(appId: string): void; + + /** + * Notify the failure result of openAtomicService. + * + * @param { string } appId - Globally unique identifier of an atomicservice, which is allocated by the cloud. + * @param { FailureCode } failureCode - Indicates the failure code for open atomic service. + * @param { string } failureMessage - Indicates the detail failure message for open atomic service. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + */ + onAtomicServiceRequestFailure(appId: string, failureCode: FailureCode, failureMessage: string): void; + + /*** if arkts 1.2 */ + /** + * Notify the success result of openAtomicService. + * + * @type { OnAtomicServiceRequestSuccessFn } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 22 + * @arkts 1.2 + */ + onAtomicServiceRequestSuccess: OnAtomicServiceRequestSuccessFn; + + /** + * Notify the failure result of openAtomicService. + * + * @type { OnAtomicServiceRequestFailureFn } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 22 + * @arkts 1.2 + */ + onAtomicServiceRequestFailure: OnAtomicServiceRequestFailureFn; + /*** endif */ +} + +export { FailureCode }; +export default CompletionHandlerForAtomicService; diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts index b9a204339502a0fc993818ee22e94b00cb900ee5..e8139c14bc5cfb41c8e5788bb1948de0cb78e1d2 100644 --- a/api/@ohos.app.ability.Configuration.d.ts +++ b/api/@ohos.app.ability.Configuration.d.ts @@ -122,7 +122,8 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ direction?: ConfigurationConstant.Direction; @@ -148,7 +149,8 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ screenDensity?: ConfigurationConstant.ScreenDensity; @@ -165,7 +167,8 @@ export interface Configuration { * @type { ?number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayId?: number; @@ -182,7 +185,8 @@ export interface Configuration { * @type { ?boolean } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ hasPointerDevice?: boolean; @@ -222,7 +226,8 @@ export interface Configuration { * @type { ?number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fontWeightScale?: number; @@ -232,7 +237,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mcc?: string; @@ -242,7 +248,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mnc?: string; diff --git a/api/@ohos.app.ability.DriverExtensionAbility.d.ts b/api/@ohos.app.ability.DriverExtensionAbility.d.ts index e2573372ec5691c21f44fe38eaeb4bfc434e5924..bd373b2c2dafeac3ac7678d100dc510122c7ed78 100644 --- a/api/@ohos.app.ability.DriverExtensionAbility.d.ts +++ b/api/@ohos.app.ability.DriverExtensionAbility.d.ts @@ -27,7 +27,8 @@ import _DriverExtensionContext from './application/DriverExtensionContext'; * * @typedef { _DriverExtensionContext } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export type DriverExtensionContext = _DriverExtensionContext; @@ -35,16 +36,18 @@ export type DriverExtensionContext = _DriverExtensionContext; * class of driver extension ability. * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class DriverExtensionAbility { +declare class DriverExtensionAbility { /** * Indicates driver extension ability context. * * @type { DriverExtensionContext } * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ context: DriverExtensionContext; @@ -53,7 +56,8 @@ export default class DriverExtensionAbility { * @param { Want } want - Indicates the want of created driver extension. * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onInit(want: Want): void; @@ -61,7 +65,8 @@ export default class DriverExtensionAbility { * Called back before a driver extension is destroyed. * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onRelease(): void; @@ -71,7 +76,8 @@ export default class DriverExtensionAbility { * @returns { rpc.RemoteObject | Promise } Rpc remoteObject. * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onConnect(want: Want): rpc.RemoteObject | Promise; @@ -85,6 +91,17 @@ export default class DriverExtensionAbility { */ onDisconnect(want: Want): void | Promise; + /** + * Called back when all abilities connected to a driver extension are disconnected. + * @param { Want } want - Indicates disconnection information about the driver extension. + * @returns { undefined | Promise } + * @syscap SystemCapability.Driver.ExternalDevice + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + onDisconnect(want: Want): undefined | Promise; + /** * Called when dump client information is required. * It is recommended that developers don't DUMP sensitive information. @@ -92,7 +109,17 @@ export default class DriverExtensionAbility { * @returns { Array } The dump info array. * @syscap SystemCapability.Driver.ExternalDevice * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onDump(params: Array): Array; } + +/** + * class of driver extension ability. + * @syscap SystemCapability.Driver.ExternalDevice + * @stagemodelonly + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 + */ +export default DriverExtensionAbility; diff --git a/api/@ohos.app.ability.InsightIntentContext.d.ts b/api/@ohos.app.ability.InsightIntentContext.d.ts index 9f2de2d357adb48adc035aba503fe59a6ee0f12c..89e087146f0fe30a9a60e21849c2ada767e3b3e0 100644 --- a/api/@ohos.app.ability.InsightIntentContext.d.ts +++ b/api/@ohos.app.ability.InsightIntentContext.d.ts @@ -27,9 +27,10 @@ import type Want from './@ohos.app.ability.Want'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class InsightIntentContext { +declare class InsightIntentContext { /** * Starts a new ability. * This interface only allows you to start abilities within the same bundle and specify the bundleName. @@ -90,3 +91,5 @@ export default class InsightIntentContext { */ startAbility(want: Want): Promise; } + +export default InsightIntentContext; \ No newline at end of file diff --git a/api/@ohos.app.ability.InsightIntentDecorator.d.ts b/api/@ohos.app.ability.InsightIntentDecorator.d.ts index 120ed65cf65c540e8dc9c0bf28a127dfc23142af..8d246236fc79423f03908bf9bca842fec1508f54 100644 --- a/api/@ohos.app.ability.InsightIntentDecorator.d.ts +++ b/api/@ohos.app.ability.InsightIntentDecorator.d.ts @@ -151,17 +151,6 @@ declare interface IntentDecoratorInfo { * @since 20 */ result?: Record; - - /** - * The example of the intent. - * - * @type { ?string } - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - */ - example?: string; } /** @@ -205,7 +194,6 @@ declare interface LinkIntentDecoratorInfo extends IntentDecoratorInfo { * * @enum { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi * @stagemodelonly * @atomicservice * @since 20 @@ -215,7 +203,6 @@ declare enum LinkParamCategory { * The parameter will added to the end of link uri. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi * @stagemodelonly * @atomicservice * @since 20 @@ -226,7 +213,6 @@ declare enum LinkParamCategory { * The parameter will transferred to the application as parameters of want. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi * @stagemodelonly * @atomicservice * @since 20 @@ -390,29 +376,6 @@ export declare const InsightIntentFunctionMethod: ((intentInfo: FunctionIntentDe */ export declare const InsightIntentFunction: (() => ClassDecorator); -/** - * Declare interface of FormIntentDecoratorInfo. - * - * @extends IntentDecoratorInfo - * @interface FormIntentDecoratorInfo - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - */ -declare interface FormIntentDecoratorInfo extends IntentDecoratorInfo { -/** - * The form name bound to the intent. - * - * @type { string } - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - */ - formName: string; -} - /** * Declare interface of EntryIntentDecoratorInfo. * diff --git a/api/@ohos.app.ability.InsightIntentExecutor.d.ts b/api/@ohos.app.ability.InsightIntentExecutor.d.ts index 69a71decc5906491b95e21bd8d0456cdfcacd261..c96abb0f0aba40a2000adcc5b70da206e728d947 100644 --- a/api/@ohos.app.ability.InsightIntentExecutor.d.ts +++ b/api/@ohos.app.ability.InsightIntentExecutor.d.ts @@ -29,9 +29,10 @@ import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionConte * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class InsightIntentExecutor { +declare class InsightIntentExecutor { /** * Indicates context of insight intent. * @@ -39,7 +40,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ context: InsightIntentContext; @@ -53,7 +55,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIAbilityForegroundMode(name: string, param: Record, pageLoader: window.WindowStage): insightIntent.ExecuteResult | Promise; @@ -67,7 +70,8 @@ export default class InsightIntentExecutor { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIAbilityBackgroundMode(name: string, param: Record): insightIntent.ExecuteResult | Promise; @@ -81,7 +85,8 @@ export default class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInUIExtensionAbility(name: string, param: Record, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult | Promise; @@ -94,8 +99,11 @@ export default class InsightIntentExecutor { * @returns { insightIntent.ExecuteResult | Promise } The result of insight intent execution, support promise. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onExecuteInServiceExtensionAbility(name: string, param: Record): insightIntent.ExecuteResult | Promise; } + +export default InsightIntentExecutor; \ No newline at end of file diff --git a/api/@ohos.app.ability.OpenLinkOptions.d.ts b/api/@ohos.app.ability.OpenLinkOptions.d.ts index e93d8ff2a737a88ceb1db1895ebff86469ef7dff..761715be6c819c564994083a7c9531d36d5a7823 100644 --- a/api/@ohos.app.ability.OpenLinkOptions.d.ts +++ b/api/@ohos.app.ability.OpenLinkOptions.d.ts @@ -25,7 +25,8 @@ * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export default interface OpenLinkOptions { /** @@ -36,7 +37,8 @@ export default interface OpenLinkOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appLinkingOnly?: boolean; @@ -47,7 +49,21 @@ export default interface OpenLinkOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record; + + /** + * Determines whether to hide a dialog when deep linking fails to match an application. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + hideFailureTipDialog?: boolean; } diff --git a/api/@ohos.app.ability.PrintExtensionAbility.d.ts b/api/@ohos.app.ability.PrintExtensionAbility.d.ts index ce61e8acfe75d3998a57998e116ab941b20678b4..eccc0acff539fd91680913cd8ff4b5e873e4bae9 100644 --- a/api/@ohos.app.ability.PrintExtensionAbility.d.ts +++ b/api/@ohos.app.ability.PrintExtensionAbility.d.ts @@ -18,7 +18,7 @@ * @kit BasicServicesKit */ -import type Want from './@ohos.application.Want'; +import type Want from './@ohos.app.ability.Want'; import type print from './@ohos.print'; /** @@ -26,16 +26,18 @@ import type print from './@ohos.print'; * * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ -export default class PrintExtensionAbility { +declare class PrintExtensionAbility { /** * Called once to initialize the extensionAbility. * @param { Want } want - call print page want params. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onCreate(want: Want): void; @@ -43,7 +45,8 @@ export default class PrintExtensionAbility { * Called once to start to discover the printers connected with the device. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onStartDiscoverPrinter(): void; @@ -51,7 +54,8 @@ export default class PrintExtensionAbility { * Called once to stop discovering the printer. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onStopDiscoverPrinter(): void; @@ -60,7 +64,8 @@ export default class PrintExtensionAbility { * @param { number } printerId - connect the printerId. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onConnectPrinter(printerId: number): void; @@ -69,7 +74,8 @@ export default class PrintExtensionAbility { * @param { number } printerId - connect the printerId. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDisconnectPrinter(printerId: number): void; @@ -80,7 +86,8 @@ export default class PrintExtensionAbility { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onStartPrintJob(jobInfo: print.PrintJob): void; @@ -91,7 +98,8 @@ export default class PrintExtensionAbility { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onCancelPrintJob(jobInfo: print.PrintJob): void; @@ -103,7 +111,8 @@ export default class PrintExtensionAbility { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onRequestPrinterCapability(printerId: number): print.PrinterCapability; @@ -115,7 +124,8 @@ export default class PrintExtensionAbility { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ onRequestPreview(jobInfo: print.PrintJob): string; @@ -123,7 +133,10 @@ export default class PrintExtensionAbility { * Called once to finalize the extensionAbility. * @syscap SystemCapability.Print.PrintFramework * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ onDestroy(): void; } + +export default PrintExtensionAbility; \ No newline at end of file diff --git a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts index 0d678b9f424a7118b6f4df8de7b7f9f99ff24f80..9fb19d970b90c60f6b803e15176137b68f65b738 100644 --- a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts @@ -155,7 +155,8 @@ declare class ServiceExtensionAbility { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfigurationUpdate(newConfig: Configuration): void; diff --git a/api/@ohos.app.ability.StartOptions.d.ts b/api/@ohos.app.ability.StartOptions.d.ts index 8526689c432230d3b00fc41900f663a3e29a9361..662b8f961f7c778673842f49d8fb00e704150497 100644 --- a/api/@ohos.app.ability.StartOptions.d.ts +++ b/api/@ohos.app.ability.StartOptions.d.ts @@ -17,12 +17,12 @@ * @file * @kit AbilityKit */ - -/*** if arkts 1.1 */ import contextConstant from "./@ohos.app.ability.contextConstant"; import image from "./@ohos.multimedia.image"; import bundleManager from './@ohos.bundle.bundleManager'; +/*** if arkts 1.1 */ import CompletionHandler from './@ohos.app.ability.CompletionHandler'; +import window from './@ohos.window'; /*** endif */ /** @@ -51,7 +51,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ windowMode?: number; @@ -81,7 +82,8 @@ export default class StartOptions { * @type { ?boolean } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ withAnimation?: boolean; @@ -91,7 +93,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowLeft?: number; @@ -101,7 +104,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowTop?: number; @@ -111,7 +115,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowWidth?: number; @@ -121,7 +126,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ windowHeight?: number; @@ -132,7 +138,8 @@ export default class StartOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ windowFocused?: boolean; @@ -144,7 +151,8 @@ export default class StartOptions { * @type { ?contextConstant.ProcessMode } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ processMode?: contextConstant.ProcessMode; @@ -156,7 +164,8 @@ export default class StartOptions { * @type { ?contextConstant.StartupVisibility } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startupVisibility?: contextConstant.StartupVisibility; @@ -166,7 +175,8 @@ export default class StartOptions { * @type { ?image.PixelMap } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startWindowIcon?: image.PixelMap; @@ -176,7 +186,8 @@ export default class StartOptions { * @type { ?string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ startWindowBackgroundColor?: string; @@ -186,7 +197,8 @@ export default class StartOptions { * @type { ?Array } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ supportWindowModes?: Array; @@ -196,7 +208,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ minWindowWidth?: number; @@ -206,7 +219,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ minWindowHeight?: number; @@ -216,7 +230,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ maxWindowWidth?: number; @@ -226,7 +241,8 @@ export default class StartOptions { * @type { ?number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ maxWindowHeight?: number; @@ -250,4 +266,14 @@ export default class StartOptions { * @since 20 */ hideStartWindow?: boolean; + + /** + * Indicates the window creation parameters during application startup. + * + * @type { ?window.WindowCreateParams } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 20 + */ + windowCreateParams?: window.WindowCreateParams; } \ No newline at end of file diff --git a/api/@ohos.app.ability.UIAbility.d.ts b/api/@ohos.app.ability.UIAbility.d.ts index f7680dd63e5efbd15144595b5025ac5084532fe7..0f6b0cc85f1d5fca88808914a80d3012d258835d 100644 --- a/api/@ohos.app.ability.UIAbility.d.ts +++ b/api/@ohos.app.ability.UIAbility.d.ts @@ -47,6 +47,20 @@ export interface OnReleaseCallback { (msg: string): void; } +/** + * The prototype of the listener function interface registered by the Caller. + * Defines the callback of OnRelease. + * + * @typedef OnReleaseCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param { string } msg - The notification event string listened to by the OnRelease. + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ +export type OnReleaseCallback = (msg: string)=> void; + + /** * The prototype of the listener function interface registered by the Caller. * @@ -94,7 +108,8 @@ export interface CalleeCallback { * @interface Caller * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Caller { /** @@ -155,7 +170,8 @@ export interface Caller { * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onRelease(callback: OnReleaseCallback): void; @@ -336,7 +352,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ launchWant: Want; @@ -355,7 +372,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ lastRequestWant: Want; @@ -442,7 +460,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowStageWillDestroy(windowStage: window.WindowStage): void; @@ -488,7 +507,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowStageRestore(windowStage: window.WindowStage): void; @@ -766,7 +786,12 @@ declare class UIAbility extends Ability { /** * Called when a UIAbility instance that has undergone the following states is started again: * started in the foreground, running in the foreground, and switched to the background. - * In other words, a UIAbility instance enters this lifecycle callback from a hot start. + * + * The triggering of the onNewWant lifecycle of a UIAbility instance indicates that this launch is a hot launch. + * Note that a hot launch does not necessarily trigger the onNewWant lifecycle. + * + * If you need to prevent the onNewWant lifecycle from being triggered in specific scenarios, + * you must call the {@link UIAbilityContext.setOnNewWantSkipScenarios} interface to suppress its callback. * * @param { Want } want - Want information, such as the ability name and bundle name. * @param { AbilityConstant.LaunchParam } launchParam - Reason for the UIAbility startup and the last abnormal exit. @@ -950,7 +975,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onBackPressed(): boolean; diff --git a/api/@ohos.app.ability.UIExtensionContentSession.d.ts b/api/@ohos.app.ability.UIExtensionContentSession.d.ts index 146c2971a77ebef44f36c72fb29ac472a2b4fb7d..8f9f41357a03236a59e4d0d3d10c8bcd15b9d098 100644 --- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts +++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts @@ -97,7 +97,8 @@ declare class UIExtensionContentSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setReceiveDataForResultCallback(callback: (data: Record) => Record): void; diff --git a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts index 7a8e808c03da3a0ac350f84532914d8a63e80bd2..9db28c4b994b2a2f6d040ac7b4dbccee5cef00a8 100644 --- a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit UserAuthenticationKit + * @arkts 1.1&1.2 */ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; @@ -27,7 +28,7 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10','1.2':'22'} */ export default class UserAuthExtensionAbility extends UIExtensionAbility { } \ No newline at end of file diff --git a/api/@ohos.app.ability.Want.d.ts b/api/@ohos.app.ability.Want.d.ts index c02d8ccd5b74588f25ef809f5c0a94c6c650656d..ae262892e81296f6f3d3ab4e9df5b957d738e20d 100644 --- a/api/@ohos.app.ability.Want.d.ts +++ b/api/@ohos.app.ability.Want.d.ts @@ -362,7 +362,8 @@ export default class Want { * @readonly * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly fds?: Record; } diff --git a/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts b/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts index 3fa78db0916e5a06e03c695528b2b4be9592827e..c927cbc29ec467a090869658867ac317a83b559b 100644 --- a/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts +++ b/api/@ohos.app.ability.abilityDelegatorRegistry.d.ts @@ -21,10 +21,8 @@ import { AbilityDelegator as _AbilityDelegator } from './application/AbilityDelegator'; import { AbilityDelegatorArgs as _AbilityDelegatorArgs } from './application/abilityDelegatorArgs'; import { AbilityMonitor as _AbilityMonitor } from './application/AbilityMonitor'; -/*** if arkts 1.1 */ import { AbilityStageMonitor as _AbilityStageMonitor } from './application/AbilityStageMonitor'; import { ShellCmdResult as _ShellCmdResult } from './application/shellCmdResult'; -/*** endif */ /** * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered @@ -131,7 +129,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum AbilityLifecycleState { /** @@ -153,7 +152,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNINITIALIZED, @@ -176,7 +176,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CREATE, @@ -199,7 +200,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FOREGROUND, @@ -222,7 +224,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND, @@ -245,7 +248,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DESTROY } @@ -340,7 +344,8 @@ declare namespace abilityDelegatorRegistry { * @typedef { _ShellCmdResult } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ShellCmdResult = _ShellCmdResult; @@ -352,7 +357,8 @@ declare namespace abilityDelegatorRegistry { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export type AbilityStageMonitor = _AbilityStageMonitor; } diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 1acdb5ed8168b6e4865100682d9962b741bce023..ad7c405cd42591525ae79545115a978980321f7e 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -18,15 +18,20 @@ * @kit AbilityKit */ -import { AbilityResult } from './ability/abilityResult'; import { AsyncCallback } from './@ohos.base'; +import { ElementName } from './bundleManager/ElementName'; +/*** if arkts 1.1 */ +import { AbilityResult } from './ability/abilityResult'; import { Configuration } from './@ohos.app.ability.Configuration'; import Context from './application/Context'; import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo'; import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo'; -import { ElementName } from './bundleManager/ElementName'; import * as _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver'; import * as _AbilityStateData from './application/AbilityStateData'; +/*** endif */ +/*** if arkts 1.2 */ +import _AbilityStateData from './application/AbilityStateData'; +/*** endif */ /** * The class of an ability manager. @@ -42,6 +47,7 @@ import * as _AbilityStateData from './application/AbilityStateData'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare namespace abilityManager { /** @@ -313,7 +319,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTopAbility(): Promise; @@ -327,7 +334,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTopAbility(callback: AsyncCallback): void; @@ -435,7 +443,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundUIAbilities(callback: AsyncCallback>): void; @@ -449,7 +458,8 @@ declare namespace abilityManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundUIAbilities(): Promise>; @@ -526,7 +536,8 @@ declare namespace abilityManager { * Restart the current atomic service. * * @param { Context } context - The context that initiates the restart. - * @throws { BusinessError } 16000050 - Internal error. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed; + * 2.Send restart message to system service failed; 3.System service failed to communicate with dependency module. * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. * @throws { BusinessError } 16000064 - Restart too frequently. Try again at least 3s later. * @throws { BusinessError } 16000086 - The context is not UIAbilityContext. @@ -556,6 +567,17 @@ declare namespace abilityManager { */ export type AbilityStateData = _AbilityStateData.default; + /** + * The ability state data. + * + * @typedef { _AbilityStateData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + export type AbilityStateData = _AbilityStateData; + + /** * The class of an extension running information. * diff --git a/api/@ohos.app.ability.appManager.d.ts b/api/@ohos.app.ability.appManager.d.ts index 0dd30a6d143eaa3f187c8c954cb92e932df7ca89..4fa135881501bdb6b5258f6b67f65f4c37570eb0 100644 --- a/api/@ohos.app.ability.appManager.d.ts +++ b/api/@ohos.app.ability.appManager.d.ts @@ -19,16 +19,22 @@ */ import { AsyncCallback } from './@ohos.base'; +import { ProcessInformation as _ProcessInformation } from './application/ProcessInformation'; +import bundleManager from './@ohos.bundle.bundleManager'; +import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/RunningMultiAppInfo'; +/*** if arkts 1.1 */ import * as _ApplicationStateObserver from './application/ApplicationStateObserver'; import type * as _AppForegroundStateObserver from './application/AppForegroundStateObserver'; import * as _AbilityStateData from './application/AbilityStateData'; -import * as _AppStateData from './application/AppStateData'; +import * as _AppStateData from './application/AppStateData'; import type * as _ProcessData from './application/ProcessData'; -import { ProcessInformation as _ProcessInformation } from './application/ProcessInformation'; import * as _AbilityFirstFrameStateObserver from './application/AbilityFirstFrameStateObserver'; import * as _AbilityFirstFrameStateData from './application/AbilityFirstFrameStateData'; -import bundleManager from './@ohos.bundle.bundleManager'; -import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/RunningMultiAppInfo'; +/*** endif */ +/*** if arkts 1.2 */ +import _AbilityStateData from './application/AbilityStateData'; +import _AppStateData from './application/AppStateData'; +/*** endif */ /** * This module provides the function of app manager service. @@ -43,7 +49,8 @@ import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/Runni * @namespace appManager * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace appManager { /** @@ -52,7 +59,8 @@ declare namespace appManager { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ApplicationState { /** @@ -60,7 +68,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_CREATE, @@ -69,7 +78,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_FOREGROUND, @@ -87,7 +97,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BACKGROUND, @@ -96,7 +107,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_DESTROY } @@ -114,7 +126,8 @@ declare namespace appManager { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ProcessState { /** @@ -128,7 +141,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_CREATE, @@ -143,7 +157,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_FOREGROUND, @@ -158,7 +173,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ACTIVE, @@ -173,7 +189,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BACKGROUND, @@ -188,7 +205,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_DESTROY } @@ -200,7 +218,8 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum PreloadMode { /** @@ -209,7 +228,8 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PRESS_DOWN } @@ -483,7 +503,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundApplications(callback: AsyncCallback>): void; @@ -497,7 +518,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getForegroundApplications(): Promise>; @@ -849,7 +871,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInformation(): Promise>; @@ -892,7 +915,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInformation(callback: AsyncCallback>): void; @@ -974,7 +998,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInfoByBundleName(bundleName: string, callback: AsyncCallback>): void; @@ -990,7 +1015,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInfoByBundleName(bundleName: string, userId: number, callback: AsyncCallback>): void; @@ -1005,7 +1031,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInfoByBundleName(bundleName: string): Promise>; @@ -1021,7 +1048,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInfoByBundleName(bundleName: string, userId: number): Promise>; @@ -1097,7 +1125,8 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningMultiAppInfo(bundleName: string): Promise; @@ -1288,6 +1317,16 @@ declare namespace appManager { */ export type AppStateData = _AppStateData.default; + /** + * The application state data. + * + * @typedef { _AppStateData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + export type AppStateData = _AppStateData; + /** * The application state observer. * @@ -1319,7 +1358,8 @@ declare namespace appManager { * @typedef { _ProcessInformation } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ProcessInformation = _ProcessInformation; @@ -1358,7 +1398,8 @@ declare namespace appManager { * @typedef { _RunningMultiAppInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type RunningMultiAppInfo = _RunningMultiAppInfo; } diff --git a/api/@ohos.app.ability.application.d.ts b/api/@ohos.app.ability.application.d.ts index 37e58fa584adf1b195dba1ea5be8e3b2e3ede103..ebe37b1f6813fcf0dcc2665477069cc32c27b12b 100644 --- a/api/@ohos.app.ability.application.d.ts +++ b/api/@ohos.app.ability.application.d.ts @@ -28,7 +28,8 @@ import Context from './application/Context'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace application { /** @@ -41,7 +42,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createModuleContext(context: Context, moduleName: string): Promise; @@ -59,7 +61,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createModuleContext(context: Context, bundleName: string, moduleName: string): Promise; @@ -76,6 +79,24 @@ declare namespace application { */ export function createPluginModuleContext(context: Context, pluginBundleName: string, pluginModuleName: string): Promise; + /** + * Create a context for a specified plugin module under the host application. + * + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @param { Context } context - Indicates current context. + * @param { string } pluginBundleName - Indicates the bundle name of plugin. + * @param { string } pluginModuleName - Indicates the module name of plugin. + * @param { string } hostBundleName - Indicates the bundle name of host application. + * @returns { Promise } Returns the module context of plugin. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @stagemodelonly + * @since 20 + */ + export function createPluginModuleContextForHostBundle(context: Context, pluginBundleName: string, pluginModuleName: string, hostBundleName: string): Promise; + /** * Create a bundle context * @@ -89,7 +110,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createBundleContext(context: Context, bundleName: string): Promise; @@ -136,6 +158,22 @@ declare namespace application { * @since 20 */ export function demoteCurrentFromCandidateMasterProcess(): Promise; + + /** + * Exit from the master process role of the current process. + * After calling this method: + * - System stops triggering `onNewProcessRequest` callbacks on current process. + * - Process can rejoin candidate pool via `promoteCurrentToCandidateMasterProcess`. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 16000118 - Not a master process. + * @throws { BusinessError } 16000119 - Cannot exit because there is an unfinished onNewProcessRequest. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 21 + */ + export function exitMasterProcessRole(): Promise } export default application; \ No newline at end of file diff --git a/api/@ohos.app.ability.autoStartupManager.d.ts b/api/@ohos.app.ability.autoStartupManager.d.ts index 7efb74a216233c0853a99461c5081979dc0fa28b..2e500d252af66667c547ae4bd6c448a36e548b85 100644 --- a/api/@ohos.app.ability.autoStartupManager.d.ts +++ b/api/@ohos.app.ability.autoStartupManager.d.ts @@ -30,6 +30,14 @@ import type { AsyncCallback } from './@ohos.base'; * @systemapi * @since 11 */ +/** + * The class of auto startup manager. + * + * @namespace autoStartupManager + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 21 + * @arkts 1.1&1.2 + */ declare namespace autoStartupManager { /** * Register the listener that watches for all applications auto startup state. @@ -189,6 +197,21 @@ declare namespace autoStartupManager { * @since 11 */ function queryAllAutoStartupApplications(): Promise>; + + /** + * Retrieves the auto-start status of the current application. + * + * @returns { Promise } Returns {@code true} if the current application has been enabled for + * auto-start on boot by the user; returns {@code false} otherwise. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed; + * 2.System service failed to communicate with dependency module. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + function getAutoStartupStatusForSelf(): Promise; } export default autoStartupManager; diff --git a/api/@ohos.app.ability.contextConstant.d.ts b/api/@ohos.app.ability.contextConstant.d.ts index 723eb46972bc6ca2580a4529a6ca8a49c87b6f24..251dcfc68ac314688878874ca10c35e68b87bf5f 100644 --- a/api/@ohos.app.ability.contextConstant.d.ts +++ b/api/@ohos.app.ability.contextConstant.d.ts @@ -125,7 +125,8 @@ declare namespace contextConstant { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EL5 = 4 } @@ -206,6 +207,54 @@ declare namespace contextConstant { */ STARTUP_SHOW = 1 } + + /** + * Scenario values for disabling the onNewWant lifecycle callback. + * + * @enum { number } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + export enum Scenarios { + /** + * Indicates the scenario where a UIAbility is brought to the foreground through + * the missionManager.moveMissionToFront invocation. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SCENARIO_MOVE_MISSION_TO_FRONT = 0x00000001, + + /** + * Indicates the scenario where a UIAbility is brought to the foreground through + * the UIAbilityContext.showAbility invocation. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SCENARIO_SHOW_ABILITY = 0x00000002, + + /** + * Indicates the scenario where a UIAbility is brought to the foreground through + * the UIAbilityContext.backToCallerAbilityWithResult invocation. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SCENARIO_BACK_TO_CALLER_ABILITY_WITH_RESULT = 0x00000004 + } } export default contextConstant; diff --git a/api/@ohos.app.ability.errorManager.d.ts b/api/@ohos.app.ability.errorManager.d.ts index 5350223c8b9c07d591f503f210e0fe2a2fbf211c..46044a75d5f65393ffa3464297e4921576d7e641 100644 --- a/api/@ohos.app.ability.errorManager.d.ts +++ b/api/@ohos.app.ability.errorManager.d.ts @@ -452,6 +452,21 @@ declare namespace errorManager { */ function off(type: 'freeze', observer?: FreezeObserver): void; + /** + * Set the default exception handler, This function will be excuted right after the callback function registered + * through errorManger.on is executed. You can use it to implement chain calls instead of errorManager.on. + * This API must be called in the main thread. + * + * @param { ErrorHandler } [defaultHandler] - the default error handler. + * @returns { ErrorHandler } return original default handler. + * @throws { BusinessError } 16000205 - The API is not called in the main thread. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 21 + * @arkts 1.1 + */ + function setDefaultErrorHandler(defaultHandler?: ErrorHandler): ErrorHandler; + /** * The observer will be called by system when an error occurs. * @@ -525,6 +540,17 @@ declare namespace errorManager { * @since 18 */ export type FreezeObserver = () => void; + /** + * ErrorHandler will be called when ArkTS runtime throws an exception which doesn't caught by user. + * + * @typedef { function } + * @param { Error} errObject - the error object about the exception. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 21 + * @arkts 1.1 + */ + export type ErrorHandler = (errObject: Error) => void; } export default errorManager; diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts index 15573c0ef29db9410e5eebf11538039d6216eead..c8f75ce1d14eba4cf3b5c1c8ec002ac1902b6776 100644 --- a/api/@ohos.app.ability.insightIntent.d.ts +++ b/api/@ohos.app.ability.insightIntent.d.ts @@ -28,7 +28,8 @@ import type wantConstant from './@ohos.app.ability.wantConstant'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace insightIntent { /** @@ -38,7 +39,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ExecuteMode { /** @@ -47,7 +49,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_ABILITY_FOREGROUND = 0, @@ -57,7 +60,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_ABILITY_BACKGROUND = 1, @@ -66,7 +70,8 @@ declare namespace insightIntent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_EXTENSION_ABILITY = 2, @@ -76,7 +81,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SERVICE_EXTENSION_ABILITY = 3, } @@ -88,7 +94,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ExecuteResult { /** @@ -98,7 +105,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ code: number; @@ -109,7 +117,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ result?: Record; @@ -120,7 +129,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uris?: Array; @@ -135,7 +145,8 @@ declare namespace insightIntent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ flags?: number; } diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts index df8657ac8f734fc3013c48cc0bc649ee2db3b102..f3f76353810889b6e3a28a91c52162fb1517a681 100644 --- a/api/@ohos.app.ability.insightIntentDriver.d.ts +++ b/api/@ohos.app.ability.insightIntentDriver.d.ts @@ -30,7 +30,8 @@ import type insightIntent from './@ohos.app.ability.insightIntent'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace insightIntentDriver { /** @@ -40,7 +41,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ExecuteParam { /** @@ -50,7 +52,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -61,7 +64,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -72,7 +76,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -83,7 +88,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ insightIntentName: string; @@ -94,7 +100,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ insightIntentParam: Record; @@ -105,7 +112,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ executeMode: insightIntent.ExecuteMode; @@ -116,7 +124,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ displayId?: number; @@ -127,7 +136,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ uris?: Array; @@ -142,7 +152,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ flags?: number; } @@ -177,7 +188,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function execute(param: ExecuteParam, callback: AsyncCallback): void; @@ -211,7 +223,8 @@ declare namespace insightIntentDriver { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function execute(param: ExecuteParam): Promise; @@ -772,7 +785,8 @@ declare namespace insightIntentDriver { * @returns { Promise> } Returns the insight intent information. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 16000050 - Internal error. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Failed to connect to the system service; + * 2. The system service failed to communicate with dependency module. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly @@ -789,7 +803,8 @@ declare namespace insightIntentDriver { * @returns { Promise> } Returns the insight intent information. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 16000050 - Internal error. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Failed to connect to the system service; + * 2. The system service failed to communicate with dependency module. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly @@ -808,7 +823,8 @@ declare namespace insightIntentDriver { * @returns { Promise } Returns the insight intent information. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 16000050 - Internal error. + * @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Failed to connect to the system service; + * 2. The system service failed to communicate with dependency module. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly diff --git a/api/@ohos.app.ability.verticalPanelManager.d.ts b/api/@ohos.app.ability.verticalPanelManager.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1eee332b1a0c4515c7a0d105f43accfc9f56175b --- /dev/null +++ b/api/@ohos.app.ability.verticalPanelManager.d.ts @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import type common from './@ohos.app.ability.common'; +import { AbilityResult } from './ability/abilityResult'; + +/** + * Defines a OnError function. + * + * @typedef { function } OnErrorFn + * @param { number } code - The code returned if the UIAbility or UIExtensionAbility failed to start. + * @param { string } name - The name returned if the UIAbility or UIExtensionAbility failed to start. + * @param { string } message - The message returned if the UIAbility or UIExtensionAbility failed to start. + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ +type OnErrorFn = (code: number, name: string, message: string) => void; + +/** + * Defines a onResult function. + * + * @typedef { function } OnResultFn + * @param { AbilityResult } parameter - The Parameter returned if the UIExtensionAbility call terminateSelfWithResult. + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ +type OnResultFn = (parameter: AbilityResult) => void; + +/** + * Defines a vertical domain panel manager. + * + * @namespace verticalPanelManager + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ +declare namespace verticalPanelManager { + + /** + * Starts the vertical domain picker with panel config. + * If the target ability is visible, you can start the target ability; If the target ability is invisible, + * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability. + * If the caller application is in the background, it is not allowed to call this interface. + * + * @param { common.UIAbilityContext } context - Indicates the ui ability context of the application. + * @param { Record } wantParam - Indicates the want parameter. + * @param { PanelConfig } panelConfig - Indicates the panel config. + * @param { PanelStartCallback } panelStartCallback - indicates the panelStartCallback. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 202 - The application is not a system application. + * @throws { BusinessError } 16000050 - Failed to connect to the system service or system server handle failed. + * @throws { BusinessError } 16000135 - The main window of this ability of this context does not exits. + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + function startVerticalPanel( + context: common.UIAbilityContext, + wantParam: Record, + panelConfig: PanelConfig, + panelStartCallback: PanelStartCallback + ): Promise; + + /** + * Indicates the panel config + * + * @interface PanelConfig + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + interface PanelConfig { + /** + * The type of vertical domain + * + * @type { VerticalType } + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + type: VerticalType; + + /** + * Indicates the info about source app + * + *

**NOTE** + *
1. The values of the following keys are assigned by the system. Manual settings do not take effect, + * since the system automatically changes the values to the actual values during data transfer. + * -SOURCE_APP_BUNDLE_NAME: bundle name of the caller. The value is a string. + * -SOURCE_APP_MODULE_NAME: module name of the caller. The value is a string. + * -SOURCE_APP_ABILITY_NAME: ability name of the caller. The value is a string. + * -SOURCE_APP_WINDOW_ID: the window ID of the caller. The value is a string. + * -SOURCE_APP_SCREEN_MODE: the screen mode of the split screen. The value is a string. The value is "1". + * @type { Record } + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + sourceAppInfo: Record; + } + + /** + * Provides vertical type definition. + * + * @enum { string } VerticalType + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export enum VerticalType { + /** + * Indicates the type for Navigation. + * + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + NAVIGATION = 'navigation', + } + + /** + * The callback of start vertical panel. + * + * @typedef PanelStartCallback + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + interface PanelStartCallback { + /** + * Called when some error occurred except disconnected from UIAbility or UIExtensionAbility. + * + * @type { OnErrorFn } + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + onError: OnErrorFn; + + /** + * Called when UIExtensionAbility terminate with result. + * + * @type { ?OnResultFn } + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + onResult?: OnResultFn; + } + + /** + * export the const string of bundleName and provide it for sourceAppInfo. + * @constant + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export const SOURCE_APP_BUNDLE_NAME = 'bundleName'; + + /** + * export the const string of moduleName and provide it for sourceAppInfo. + * @constant + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export const SOURCE_APP_MODULE_NAME = 'moduleName'; + + /** + * export the const string of abilityName and provide it for sourceAppInfo. + * @constant + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export const SOURCE_APP_ABILITY_NAME = 'abilityName'; + + /** + * export the const string of windowId and provide it for sourceAppInfo. + * @constant + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export const SOURCE_APP_WINDOW_ID = 'windowId'; + + /** + * export the const string of screenMode and provide it for sourceAppInfo. + * @constant + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + */ + export const SOURCE_APP_SCREEN_MODE = 'screenMode'; +} + +export default verticalPanelManager; \ No newline at end of file diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index 7f6e272894901edcf76f0032dbbbf8b8d0658876..f61ab3080be00821d2ca6533c43c768ba5645028 100644 --- a/api/@ohos.app.ability.wantAgent.d.ts +++ b/api/@ohos.app.ability.wantAgent.d.ts @@ -20,9 +20,12 @@ import { AsyncCallback, Callback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; -import { WantAgentInfo as _WantAgentInfo, LocalWantAgentInfo as _LocalWantAgentInfo } from './wantAgent/wantAgentInfo'; +import { WantAgentInfo as _WantAgentInfo } from './wantAgent/wantAgentInfo'; import { TriggerInfo as _TriggerInfo } from './wantAgent/triggerInfo'; import Context from './application/Context'; +/*** if arkts 1.1 */ +import { LocalWantAgentInfo as _LocalWantAgentInfo } from './wantAgent/wantAgentInfo'; +/*** endif */ /** * Provide the method obtain trigger, cancel, and compare and to obtain @@ -45,7 +48,8 @@ import Context from './application/Context'; * @namespace wantAgent * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace wantAgent { /** @@ -72,7 +76,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleName(agent: WantAgent, callback: AsyncCallback): void; @@ -100,7 +105,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleName(agent: WantAgent): Promise; @@ -173,7 +179,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getWant(agent: WantAgent, callback: AsyncCallback): void; @@ -190,7 +197,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getWant(agent: WantAgent): Promise; @@ -218,7 +226,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(agent: WantAgent, callback: AsyncCallback): void; @@ -246,7 +255,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(agent: WantAgent): Promise; @@ -272,7 +282,8 @@ declare namespace wantAgent { * 2. Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback): void; @@ -322,7 +333,8 @@ declare namespace wantAgent { * 2. Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback): void; @@ -350,7 +362,8 @@ declare namespace wantAgent { * 2. Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function equal(agent: WantAgent, otherAgent: WantAgent): Promise; @@ -383,7 +396,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getWantAgent(info: WantAgentInfo, callback: AsyncCallback): void; @@ -416,7 +430,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getWantAgent(info: WantAgentInfo): Promise; @@ -446,7 +461,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOperationType(agent: WantAgent, callback: AsyncCallback): void; @@ -476,7 +492,8 @@ declare namespace wantAgent { * @throws { BusinessError } 16000151 - Invalid wantAgent object. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOperationType(agent: WantAgent): Promise; @@ -509,7 +526,6 @@ declare namespace wantAgent { * @systemapi * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ function createLocalWantAgent(info: LocalWantAgentInfo): WantAgent; @@ -540,7 +556,8 @@ declare namespace wantAgent { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum WantAgentFlags { /** @@ -555,7 +572,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ONE_TIME_FLAG = 0, @@ -571,7 +589,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NO_BUILD_FLAG, @@ -587,7 +606,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL_PRESENT_FLAG, @@ -603,7 +623,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE_PRESENT_FLAG, @@ -618,7 +639,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CONSTANT_FLAG, @@ -638,7 +660,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE_ELEMENT, @@ -658,7 +681,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE_ACTION, @@ -678,7 +702,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE_URI, @@ -698,7 +723,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE_ENTITIES, @@ -718,7 +744,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE_BUNDLE } @@ -736,7 +763,8 @@ declare namespace wantAgent { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum OperationType { /** @@ -750,7 +778,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN_TYPE = 0, @@ -765,7 +794,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ START_ABILITY, @@ -780,7 +810,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ START_ABILITIES, @@ -795,7 +826,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ START_SERVICE, @@ -810,7 +842,8 @@ declare namespace wantAgent { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SEND_COMMON_EVENT, @@ -820,7 +853,8 @@ declare namespace wantAgent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ START_SERVICE_EXTENSION = 6 } @@ -838,7 +872,8 @@ declare namespace wantAgent { * @typedef CompleteData * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface CompleteData { /** @@ -947,7 +982,8 @@ declare namespace wantAgent { * @typedef { _TriggerInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type TriggerInfo = _TriggerInfo; @@ -964,7 +1000,8 @@ declare namespace wantAgent { * @typedef { _WantAgentInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type WantAgentInfo = _WantAgentInfo; @@ -975,7 +1012,6 @@ declare namespace wantAgent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ export type LocalWantAgentInfo = _LocalWantAgentInfo; @@ -986,7 +1022,8 @@ declare namespace wantAgent { * * @typedef { object } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type WantAgent = object; diff --git a/api/@ohos.app.ability.wantConstant.d.ts b/api/@ohos.app.ability.wantConstant.d.ts index 93fd9775fb6c54b4b5d96f8df256c52ed85579f2..8421a0573ee05feffa441a62104890f84ae881ff 100644 --- a/api/@ohos.app.ability.wantConstant.d.ts +++ b/api/@ohos.app.ability.wantConstant.d.ts @@ -48,7 +48,8 @@ declare namespace wantConstant { * @enum { string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum Params { /** @@ -56,7 +57,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_SANDBOX = 'ohos.dlp.params.sandbox', @@ -65,7 +67,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_BUNDLE_NAME = 'ohos.dlp.params.bundleName', @@ -74,7 +77,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_MODULE_NAME = 'ohos.dlp.params.moduleName', @@ -83,7 +87,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_ABILITY_NAME = 'ohos.dlp.params.abilityName', @@ -92,7 +97,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DLP_PARAMS_INDEX = 'ohos.dlp.params.index', @@ -101,7 +107,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ HIDE_SENSITIVE_TYPE = 'ohos.media.params.hideSensitiveType', @@ -118,7 +125,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_BACK_TO_OTHER_MISSION_STACK = 'ability.params.backToOtherMissionStack', @@ -133,7 +141,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_RECOVERY_RESTART = 'ohos.ability.params.abilityRecoveryRestart', @@ -148,7 +157,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle', @@ -163,7 +173,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract', @@ -178,7 +189,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl', @@ -197,7 +209,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUPPORT_CONTINUE_PAGE_STACK_KEY = 'ohos.extra.param.key.supportContinuePageStack', @@ -216,7 +229,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit', @@ -226,7 +240,8 @@ declare namespace wantConstant { * @syscap SystemCapability.Ability.AbilityBase * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSERT_FAULT_SESSION_ID = 'ohos.ability.params.asssertFaultSessionId', @@ -235,7 +250,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SHOW_MODE_KEY = 'ohos.extra.param.key.showMode', @@ -244,7 +260,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PARAMS_STREAM = 'ability.params.stream', @@ -253,7 +270,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex', @@ -262,7 +280,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode', @@ -271,7 +290,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PAGE_PATH = 'ohos.param.atomicservice.pagePath', @@ -280,7 +300,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ROUTER_NAME = 'ohos.param.atomicservice.routerName', @@ -289,7 +310,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PAGE_SOURCE_FILE = 'ohos.param.atomicservice.pageSourceFile', @@ -298,7 +320,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BUILD_FUNCTION = 'ohos.param.atomicservice.buildFunction', @@ -307,7 +330,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SUB_PACKAGE_NAME = 'ohos.param.atomicservice.subpackageName', @@ -315,7 +339,8 @@ declare namespace wantConstant { * Indicates the param of app instance key. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_INSTANCE_KEY = 'ohos.extra.param.key.appInstance', @@ -323,7 +348,8 @@ declare namespace wantConstant { * Indicates the param of creating a new instance. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ CREATE_APP_INSTANCE_KEY = 'ohos.extra.param.key.createAppInstance', @@ -331,7 +357,8 @@ declare namespace wantConstant { * Indicates the app clone index of caller. * * @syscap SystemCapability.Ability.AbilityBase - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ CALLER_APP_CLONE_INDEX = 'ohos.param.callerAppCloneIndex', @@ -342,7 +369,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ LAUNCH_REASON_MESSAGE = 'ohos.params.launchReasonMessage', @@ -379,7 +407,7 @@ declare namespace wantConstant { * @atomicservice * @since 20 */ - ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter', + ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter' } /** @@ -434,7 +462,8 @@ declare namespace wantConstant { /** * Indicates that the URI can be persisted by the callee. * @syscap SystemCapability.Ability.AbilityBase - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040, @@ -449,7 +478,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_INSTALL_ON_DEMAND = 0x00000800, @@ -457,7 +487,8 @@ declare namespace wantConstant { * Collaborative target applications in the distributed scheduling system can be pulled up. * * @syscap SystemCapability.Ability.AbilityBase - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_ABILITY_ON_COLLABORATE = 0x00002000, @@ -465,7 +496,8 @@ declare namespace wantConstant { * Indicates that if implicit start ability couldn't match any application, no tip dialog will be pulled up. * * @syscap SystemCapability.Ability.AbilityBase - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_START_WITHOUT_TIPS = 0x40000000 } @@ -476,7 +508,8 @@ declare namespace wantConstant { * @enum { number } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ShowMode { /** @@ -484,7 +517,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ WINDOW = 0, @@ -493,7 +527,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMBEDDED_FULL = 1 } diff --git a/api/@ohos.app.appstartup.StartupConfigEntry.d.ts b/api/@ohos.app.appstartup.StartupConfigEntry.d.ts index 4dddbdd888c764c9d9d17bc6c2edeb3e8c9e5ec9..2675dae21846d700a457c87bc54d380c239d5a55 100644 --- a/api/@ohos.app.appstartup.StartupConfigEntry.d.ts +++ b/api/@ohos.app.appstartup.StartupConfigEntry.d.ts @@ -40,10 +40,12 @@ export default class StartupConfigEntry { onConfig?(): StartupConfig; /** - * Called when a custom match rule is requested. - * The custom match rule returned will be matched against the match rules defined in the appStartup profile. - * If any of the specified tasks meets the custom match rule, that task will be initiated; - * otherwise, the default automatic startup tasks will be initiated. + * Called to obtain a custom match rule during application launch. + * Depending on the parameters in the Want passed in, you can return various custom rules to match against the + * `customization` field in `matchRules` configured for the startup task. If a match is successful, the task is + * executed automatically. + * This interface can be used to further refine matching rules when a startup scenario cannot be matched to + * a startup task through URI, action, or intent name rules. * * @param { Want } want Want information of the started ability. * @returns { string } Custom match rule diff --git a/api/@ohos.app.form.FormEditExtensionAbility.d.ts b/api/@ohos.app.form.FormEditExtensionAbility.d.ts index a89e2c08d055ead32fd028be7d9b66b2242c9b21..975799bfc661000fea2aab8c593f8ccf93ae5784 100644 --- a/api/@ohos.app.form.FormEditExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormEditExtensionAbility.d.ts @@ -28,7 +28,7 @@ import FormEditExtensionContext from './application/FormEditExtensionContext'; * @stagemodelonly * @since 18 */ -export default class FormEditExtensionAbility extends UIExtensionAbility { +declare class FormEditExtensionAbility extends UIExtensionAbility { /** * Indicates configuration infomation about an form edit extension ability context. * @@ -39,3 +39,4 @@ export default class FormEditExtensionAbility extends UIExtensionAbility { */ context: FormEditExtensionContext; } +export default FormEditExtensionAbility; diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index f106f0c109bdec3c311236b84e249dbbf4de4c99..694d21a4cdd267b7b57615ba1cadbc206f280b91 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -24,7 +24,21 @@ import formInfo from './@ohos.app.form.formInfo'; /*** endif */ import FormExtensionContext from './application/FormExtensionContext'; import Want from './@ohos.app.ability.Want'; +/*** if arkts 1.1 */ import { Configuration } from './@ohos.app.ability.Configuration'; +/*** endif */ + +/** + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. + * + * @typedef { function } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnStopFn = () => void; /** * class of form extension. @@ -327,6 +341,18 @@ declare class FormExtensionAbility { */ onStop?(): void; + /** + * Called when this ability breaks the last link, notifying the provider that the provider process is about to stop. + * + * @type { ?OnStopFn } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onStop?: OnStopFn; + /** * Called to notify the form provider that the form location of the form has been changed. * @@ -335,8 +361,23 @@ declare class FormExtensionAbility { * * @syscap SystemCapability.Ability.Form * @stagemodelonly + * @atomicservice * @since 20 */ onFormLocationChanged(formId: string, newFormLocation: formInfo.FormLocation): void; + + /** + * Called to notify the form provider that the size of the form has been changed. Override this method if + * you want to know the form size be changed, used for data continuity and layout refresh. + * + * @param { string } formId - Indicates the ID of the form. + * @param { formInfo.FormDimension } newDimension - Indicates the new dimension of the form. + * @param { formInfo.Rect } newRect - Indicates the new rect(vp) of the form. + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + */ + onSizeChanged(formId: string, newDimension: formInfo.FormDimension, newRect: formInfo.Rect): void; } export default FormExtensionAbility; diff --git a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts index 88ad4daeaac08d994b22cb9c941b8fd20f32eb62..8a47a1405c87d992c52837c2f560b3e4fbf8e2b4 100644 --- a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts +++ b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts @@ -75,7 +75,7 @@ export interface LiveFormInfo { * @atomicservice * @since 20 */ -export default class LiveFormExtensionAbility extends ExtensionAbility { +declare class LiveFormExtensionAbility extends ExtensionAbility { /** * Indicates configuration information about a live form extension ability context. * @@ -109,4 +109,5 @@ export default class LiveFormExtensionAbility extends ExtensionAbility { * @since 20 */ onLiveFormDestroy(liveFormInfo: LiveFormInfo): void; -} \ No newline at end of file +} +export default LiveFormExtensionAbility; diff --git a/api/@ohos.app.form.formBindingData.d.ts b/api/@ohos.app.form.formBindingData.d.ts index 3cdd10aaac65dc01c36e412f979adbf9212d8771..356ef5858a53dec459c75e34a69037bc4622cc86 100644 --- a/api/@ohos.app.form.formBindingData.d.ts +++ b/api/@ohos.app.form.formBindingData.d.ts @@ -16,12 +16,9 @@ /** * @file * @kit FormKit + * @arkts 1.1&1.2 */ -/*** if arkts 1.1 */ -import { BusinessError } from './@ohos.base'; -/*** endif */ - /** * Interface of formBindingData. * @@ -93,7 +90,8 @@ declare namespace formBindingData { * @type { Object } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Object; @@ -112,7 +110,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ proxies?: Array; } @@ -132,7 +131,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ProxyData { /** @@ -150,7 +150,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; @@ -169,7 +170,8 @@ declare namespace formBindingData { * @syscap SystemCapability.Ability.Form * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ subscriberId?: string; } diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index ab3638953eb2a52dc57fe6f15789690767741b8b..107b40c152b6f3042a31cee812f01cb11c6b2bd3 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -1292,5 +1292,49 @@ declare namespace formHost { * @since 12 */ function updateFormLocation(formId: string, location: formInfo.FormLocation): void; + + /** + * Listens to the event of get live form status. + * + * @param { 'getLiveFormStatus' } type - Indicates event type. + * @param { formInfo.GetLiveFormStatusCallback } callback - The callback of get live form status. + * @throws { BusinessError } 202 - The application is not a system application. + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + function on(type: 'getLiveFormStatus', + callback: formInfo.GetLiveFormStatusCallback): void; + + /** + * Cancels Listening to the event of get live form status. + * + * @param { 'getLiveFormStatus' } type - Indicates event type. + * @param { formInfo.GetLiveFormStatusCallback } [callback] - The callback of get live form status. + * @throws { BusinessError } 202 - The application is not a system application. + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + function off(type: 'getLiveFormStatus', + callback?: formInfo.GetLiveFormStatusCallback): void; + + /** + * Update size of the form. + * + * @permission ohos.permission.REQUIRE_FORM + * @param { string } formId - Indicates the form id. + * @param { formInfo.FormDimension } newDimension - The new dimension of the form. + * @param { formInfo.Rect } newRect - The new size of the form. + * @throws { BusinessError } 201 - Permissions denied. + * @throws { BusinessError } 202 - caller is not system app. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. + * @throws { BusinessError } 16501012 - The dimension parameter is incorrect + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + function updateFormSize(formId: string, newDimension: formInfo.FormDimension, newRect: formInfo.Rect): void; } export default formHost; diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index 72db9a2b3740f901e686d0defb46db5ba577c51a..29f28eb54e3ac4e5bf565516caf0137e948ec53d 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -33,7 +33,8 @@ import Want from './@ohos.app.ability.Want'; * @namespace formInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formInfo { /** @@ -49,7 +50,8 @@ declare namespace formInfo { * @typedef FormInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfo { /** @@ -65,7 +67,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -82,7 +85,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -99,7 +103,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -116,7 +121,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -126,7 +132,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayName: string; @@ -136,7 +143,8 @@ declare namespace formInfo { * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ displayNameId: number; @@ -153,7 +161,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; @@ -170,7 +179,8 @@ declare namespace formInfo { * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ descriptionId: number; @@ -187,7 +197,8 @@ declare namespace formInfo { * @type { FormType } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: FormType; @@ -204,7 +215,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ jsComponentName: string; @@ -226,17 +238,6 @@ declare namespace formInfo { */ colorMode: ColorMode; - /** - * Obtains the rendering mode of the form. - * - * @type { ?RenderingMode } - * @readonly - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - readonly renderingMode?: RenderingMode; - /** * Checks whether this form is a default form. * @@ -250,7 +251,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDefault: boolean; @@ -267,7 +269,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ updateEnabled: boolean; @@ -284,7 +287,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formVisibleNotify: boolean; @@ -301,7 +305,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ scheduledUpdateTime: string; @@ -318,7 +323,8 @@ declare namespace formInfo { * @type { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formConfigAbility: string; @@ -335,7 +341,8 @@ declare namespace formInfo { * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ updateDuration: number; @@ -352,7 +359,8 @@ declare namespace formInfo { * @type { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ defaultDimension: number; @@ -369,7 +377,8 @@ declare namespace formInfo { * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ supportDimensions: Array; @@ -386,7 +395,8 @@ declare namespace formInfo { * @type { Record } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ customizeData: Record; @@ -403,7 +413,8 @@ declare namespace formInfo { * @type { boolean } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isDynamic: boolean; @@ -414,7 +425,8 @@ declare namespace formInfo { * @default false * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ transparencyEnabled: boolean; @@ -424,7 +436,8 @@ declare namespace formInfo { * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ supportedShapes: Array; @@ -436,7 +449,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly previewImages?: Array; @@ -447,10 +461,23 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly enableBlurBackground?: boolean; + /** + * Obtains the rendering mode of the form. + * + * @type { ?RenderingMode } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + readonly renderingMode?: RenderingMode; + /** * Indicates the fun interaction form params * @@ -472,6 +499,67 @@ declare namespace formInfo { * @since 20 */ readonly sceneAnimationParams?: SceneAnimationParams; + + /** + * Obtains the resizable of the form. + * + * @type { ?boolean } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + readonly resizable?: boolean; + + /** + * Obtains the group id of the form. + * + * @type { ?string } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + readonly groupId?: string; + } + + /** + * Rendering mode. + * + * @enum { number } + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum RenderingMode { + /** + * Auto color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + AUTO_COLOR = 0, + /** + * Full color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + FULL_COLOR = 1, + /** + * Single color mode. + * + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + SINGLE_COLOR = 2 } /** @@ -487,7 +575,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormType { /** @@ -501,7 +590,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ JS = 1, @@ -516,7 +606,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ eTS = 2 } @@ -550,6 +641,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_AUTO = -1, @@ -565,6 +657,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_DARK = 0, @@ -580,47 +673,11 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_LIGHT = 1 } - /** - * Rendering mode. - * - * @enum { number } - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - enum RenderingMode { - /** - * Auto color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - AUTO_COLOR = 0, - - /** - * Full color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - FULL_COLOR = 1, - - /** - * Single color mode. - * - * @syscap SystemCapability.Ability.Form - * @systemapi - * @since 18 - */ - SINGLE_COLOR = 2 - } - /** * Provides state information about a form. * @@ -634,7 +691,8 @@ declare namespace formInfo { * @typedef FormStateInfo * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormStateInfo { /** @@ -650,7 +708,8 @@ declare namespace formInfo { * @type { FormState } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ formState: FormState; @@ -667,7 +726,8 @@ declare namespace formInfo { * @type { Want } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; } @@ -685,7 +745,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormState { /** @@ -699,7 +760,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = -1, @@ -714,7 +776,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -729,7 +792,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1 } @@ -747,7 +811,8 @@ declare namespace formInfo { * @enum { string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormParam { /** @@ -771,9 +836,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - IDENTITY_KEY = 'ohos.extra.param.key.form_identity', + IDENTITY_KEY = "ohos.extra.param.key.form_identity", /** * Indicates the key specifying the grid style of the form to be obtained, which is represented as @@ -796,9 +862,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_KEY = 'ohos.extra.param.key.form_dimension', + DIMENSION_KEY = "ohos.extra.param.key.form_dimension", /** * Indicates the key specifying the name of the form to be obtained, which is represented as @@ -821,9 +888,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - NAME_KEY = 'ohos.extra.param.key.form_name', + NAME_KEY = "ohos.extra.param.key.form_name", /** * Indicates the key specifying the name of the module to which the form to be obtained belongs, which is @@ -850,9 +918,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - MODULE_NAME_KEY = 'ohos.extra.param.key.module_name', + MODULE_NAME_KEY = "ohos.extra.param.key.module_name", /** * Indicates the key specifying the width of the form to be obtained, which is represented as @@ -875,9 +944,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - WIDTH_KEY = 'ohos.extra.param.key.form_width', + WIDTH_KEY = "ohos.extra.param.key.form_width", /** * Indicates the key specifying the height of the form to be obtained, which is represented as @@ -900,9 +970,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - HEIGHT_KEY = 'ohos.extra.param.key.form_height', + HEIGHT_KEY = "ohos.extra.param.key.form_height", /** * Indicates the key specifying whether a form is temporary, which is represented as @@ -925,9 +996,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - TEMPORARY_KEY = 'ohos.extra.param.key.form_temporary', + TEMPORARY_KEY = "ohos.extra.param.key.form_temporary", /** * Indicates the key specifying the name of the bundle to be obtained, which is represented as @@ -950,9 +1022,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - BUNDLE_NAME_KEY = 'ohos.extra.param.key.bundle_name', + BUNDLE_NAME_KEY = "ohos.extra.param.key.bundle_name", /** * Indicates the key specifying the name of the ability to be obtained, which is represented as @@ -975,9 +1048,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - ABILITY_NAME_KEY = 'ohos.extra.param.key.ability_name', + ABILITY_NAME_KEY = "ohos.extra.param.key.ability_name", /** * Indicates the key specifying whether a form type is theme, which is represented as @@ -989,7 +1063,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ THEME_KEY = 'ohos.extra.param.key.form_is_theme', @@ -1003,9 +1078,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - DEVICE_ID_KEY = 'ohos.extra.param.key.device_id', + DEVICE_ID_KEY = "ohos.extra.param.key.device_id", /** * Indicates the key specifying the launch reason of the form to be obtained, which is represented as @@ -1028,9 +1104,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - LAUNCH_REASON_KEY = 'ohos.extra.param.key.form_launch_reason', + LAUNCH_REASON_KEY = "ohos.extra.param.key.form_launch_reason", /** * Indicates the key specifying the custom data of the form to be obtained, which is represented as @@ -1057,9 +1134,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - PARAM_FORM_CUSTOMIZE_KEY = 'ohos.extra.param.key.form_customize', + PARAM_FORM_CUSTOMIZE_KEY = "ohos.extra.param.key.form_customize", /** * Indicates the key specifying the form location, which is represented as @@ -1070,7 +1148,8 @@ declare namespace formInfo { * }. * * @syscap SystemCapability.Ability.Form - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_LOCATION_KEY = 'ohos.extra.param.key.form_location', @@ -1095,7 +1174,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_RENDERING_MODE_KEY = 'ohos.extra.param.key.form_rendering_mode', @@ -1109,7 +1189,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ HOST_BG_INVERSE_COLOR_KEY = 'ohos.extra.param.key.host_bg_inverse_color', @@ -1123,7 +1204,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_NAME_KEY = 'ohos.extra.param.key.permission_name', @@ -1137,9 +1219,25 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_PERMISSION_GRANTED_KEY = 'ohos.extra.param.key.permission_granted', + + /** + * Indicates the key specifying the original form id, used in conjunction with LaunchReason.FORM_SIZE_CHANGE. + * which is represented as + * want: { + * "parameters": { + * ORIGINAL_FORM_KEY: "119476135" + * } + * } + * + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + */ + ORIGINAL_FORM_KEY = 'ohos.extra.param.key.original_form_id', } /** @@ -1157,7 +1255,8 @@ declare namespace formInfo { * @typedef FormInfoFilter * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormInfoFilter { /** @@ -1167,7 +1266,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; @@ -1186,7 +1286,8 @@ declare namespace formInfo { * @type { ?string } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName?: string; @@ -1197,7 +1298,8 @@ declare namespace formInfo { * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ supportedDimensions?: Array; @@ -1208,7 +1310,8 @@ declare namespace formInfo { * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ supportedShapes?: Array; } @@ -1226,7 +1329,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormDimension { /** @@ -1240,7 +1344,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Dimension_1_2 = 1, @@ -1255,9 +1360,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_2, + Dimension_2_2 = 2, /** * 2 x 4 form @@ -1270,9 +1376,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_2_4, + Dimension_2_4 = 3, /** * 4 x 4 form @@ -1285,9 +1392,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Dimension_4_4, + Dimension_4_4 = 4, /** * 2 x 1 form @@ -1301,6 +1409,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ Dimension_2_1, @@ -1309,25 +1418,28 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_1_1, + DIMENSION_1_1 = 6, /** * 6 x 4 form * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_6_4, + DIMENSION_6_4 = 7, /** * 2 x 3 form used for wearable devices * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ DIMENSION_2_3 = 8, @@ -1336,27 +1448,20 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 - */ - DIMENSION_3_3 = 9, - - /** - * 3 x 4 form used for tv devices - * - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_4 = 10, + DIMENSION_3_3 = 9 } - /** + /** * Defines the FormShape enum. * * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormShape { /** @@ -1364,7 +1469,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RECT = 1, @@ -1373,9 +1479,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - CIRCLE, + CIRCLE = 2 } /** @@ -1391,7 +1498,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VisibilityType { /** @@ -1409,7 +1517,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, /** @@ -1427,7 +1536,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_VISIBLE = 1, /** @@ -1445,9 +1555,10 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_INVISIBLE + FORM_INVISIBLE = 2 } /** @@ -1463,7 +1574,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum LaunchReason { /** @@ -1477,7 +1589,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_DEFAULT = 1, /** @@ -1491,9 +1604,18 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - FORM_SHARE + FORM_SHARE = 2, + /** + * Indicates the launch reason of a form is change size. + * + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + */ + FORM_SIZE_CHANGE = 3 } /** @@ -1503,7 +1625,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PublishFormResult { /** @@ -1513,7 +1636,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ code: PublishFormErrorCode; @@ -1524,7 +1648,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; } @@ -1536,7 +1661,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PublishFormErrorCode { /** @@ -1545,9 +1671,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - SUCCESS, + SUCCESS = 0, /** * Host has no space to publish form. @@ -1555,9 +1682,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - NO_SPACE, + NO_SPACE = 1, /** * Check param failed. @@ -1565,9 +1693,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - PARAM_ERROR, + PARAM_ERROR = 2, /** * Internal error occurs during form processing. @@ -1575,9 +1704,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - INTERNAL_ERROR, + INTERNAL_ERROR = 3 } /** @@ -1587,7 +1717,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FormProviderFilter { /** @@ -1597,7 +1728,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -1608,9 +1740,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - formName?: string; + formName ?: string; /** * Obtains the module name of the provider application module. @@ -1619,9 +1752,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - moduleName?: string; + moduleName ?: string; /** * Obtains the ability name of the provider application module. @@ -1630,9 +1764,10 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - abilityName?: string; + abilityName ?: string; /** * Indicates whether to include unused form. @@ -1642,7 +1777,8 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isUnusedIncluded?: boolean; } @@ -1655,6 +1791,15 @@ declare namespace formInfo { * @systemapi hide this for inner system use * @since 10 */ + /** + * The class of a running form information. + * + * @typedef RunningFormInfo + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ interface RunningFormInfo { /** * Obtains the id of the this form. @@ -1666,6 +1811,17 @@ declare namespace formInfo { * @systemapi * @since 10 */ + /** + * Obtains the id of the this form. + * + * @type { string } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly formId: string; /** @@ -1678,6 +1834,17 @@ declare namespace formInfo { * @systemapi * @since 10 */ + /** + * Obtains the bundle name of the application to which this form belongs. + * + * @type { string } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly bundleName: string; /** @@ -1688,7 +1855,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly hostBundleName: string; @@ -1702,6 +1870,17 @@ declare namespace formInfo { * @systemapi * @since 12 */ + /** + * The location of this form. + * + * @type { FormLocation } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly formLocation: FormLocation; /** @@ -1712,7 +1891,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly visibilityType: VisibilityType; @@ -1726,6 +1906,17 @@ declare namespace formInfo { * @systemapi * @since 10 */ + /** + * Obtains the name of the application module to which this form belongs. + * + * @type { string } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly moduleName: string; /** @@ -1738,6 +1929,17 @@ declare namespace formInfo { * @systemapi * @since 10 */ + /** + * Obtains the class name of the ability to which this form belongs. + * + * @type { string } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly abilityName: string; /** @@ -1750,18 +1952,40 @@ declare namespace formInfo { * @systemapi * @since 10 */ + /** + * Obtains the name of this form. + * + * @type { string } + * @readonly + * @default - + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly formName: string; /** * Obtains the grid style of this form. * * @type { number } - * @readonly * @default - + * @readonly * @syscap SystemCapability.Ability.Form * @systemapi * @since 10 */ + /** + * Obtains the grid style of this form. + * + * @type { int } + * @default - + * @readonly + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ readonly dimension: number; /** @@ -1772,7 +1996,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formUsageState: FormUsageState; @@ -1783,7 +2008,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formDescription: string; @@ -1795,7 +2021,8 @@ declare namespace formInfo { * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly extraData?: Record; } @@ -1806,7 +2033,8 @@ declare namespace formInfo { * @enum { number } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormUsageState { /** @@ -1814,7 +2042,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ USED = 0, /** @@ -1822,15 +2051,16 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - UNUSED = 1, + UNUSED = 1 } /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi * @since 12 @@ -1838,9 +2068,11 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ enum FormLocation { /** @@ -1848,7 +2080,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = -1, @@ -1863,7 +2096,9 @@ declare namespace formInfo { * Form is on the desktop * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ DESKTOP = 0, @@ -1878,7 +2113,9 @@ declare namespace formInfo { * Form is on the form center. * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ FORM_CENTER = 1, @@ -1893,7 +2130,9 @@ declare namespace formInfo { * Form is on the form manager. * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ FORM_MANAGER = 2, @@ -1908,7 +2147,9 @@ declare namespace formInfo { * Form is on the negative screen. * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ NEGATIVE_SCREEN = 3, @@ -1917,7 +2158,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_CENTER_NEGATIVE_SCREEN = 4, @@ -1926,7 +2168,8 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FORM_MANAGER_NEGATIVE_SCREEN = 5, @@ -1941,7 +2184,9 @@ declare namespace formInfo { * Form is on the screen lock. * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ SCREEN_LOCK = 6, @@ -1956,7 +2201,9 @@ declare namespace formInfo { * Form is on the ai suggestion. * * @syscap SystemCapability.Ability.Form + * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ AI_SUGGESTION = 7, } @@ -2223,5 +2470,26 @@ declare namespace formInfo { */ (formId: string): Promise; } + + /** + * Get live form status info callback + * + * @typedef GetLiveFormStatusCallback + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + interface GetLiveFormStatusCallback { + /** + * Get all live form status Record + * + * @returns { Record } + * @throws { BusinessError } 202 - The application is not a system application. + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + (): Record; + } } export default formInfo; diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 7bd2de5b9bae2f9b673b8df69291575c701182f0..3a1654146005ae56447ea3c76b242985f1be7cf6 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -20,7 +20,9 @@ import { AsyncCallback } from './@ohos.base'; import formBindingData from './@ohos.app.form.formBindingData'; +/*** if arkts 1.1 */ import formInfo from './@ohos.app.form.formInfo'; +/*** endif */ import Want from './@ohos.app.ability.Want'; /** @@ -36,7 +38,8 @@ import Want from './@ohos.app.ability.Want'; * @namespace formProvider * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formProvider { /** @@ -74,7 +77,8 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback): void; @@ -113,7 +117,8 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function setFormNextRefreshTime(formId: string, minute: number): Promise; @@ -387,6 +392,8 @@ declare namespace formProvider { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 18 + * @deprecated since 20 + * @useinstead getPublishedRunningFormInfoById */ function getPublishedFormInfoById(formId: string): Promise; @@ -401,9 +408,40 @@ declare namespace formProvider { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 18 + * @deprecated since 20 + * @useinstead getPublishedRunningFormInfos */ function getPublishedFormInfos(): Promise>; + /** + * Get running form info by form id belonging to the current bundle. + * + * @param { string } formId - Indicates the form ID. + * @returns { Promise } Returns the running formInfo. + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. + * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + */ + function getPublishedRunningFormInfoById(formId: string): Promise; + + /** + * Get running form infos of all published forms belonging to current bundle. + * + * @returns { Promise> } Returns published running formInfo belongs to the caller + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @syscap SystemCapability.Ability.Form + * @atomicservice + * @since 20 + */ + function getPublishedRunningFormInfos(): Promise> + /** * Open the view of forms belonging to current bundle. * Client to communication with FormManagerService. diff --git a/api/@ohos.application.AccessibilityExtensionAbility.d.ts b/api/@ohos.application.AccessibilityExtensionAbility.d.ts index 2a4c4cb24ab83702cbecae7a436ed3a35c55d698..2e77bb914646be28421ad216e8f4e4c4a1b82c18 100644 --- a/api/@ohos.application.AccessibilityExtensionAbility.d.ts +++ b/api/@ohos.application.AccessibilityExtensionAbility.d.ts @@ -27,6 +27,7 @@ import type { FocusType as _FocusType, WindowType as _WindowType, Rect as _Rect, + Parameter as _Parameter, } from './application/AccessibilityExtensionContext'; import type * as _AccessibilityExtensionContext from './application/AccessibilityExtensionContext'; import { AccessibilityEventType } from './@ohos.accessibility'; @@ -97,13 +98,13 @@ export type WindowType = _WindowType; export type Rect = _Rect; /** - * Indicates the parameter of the AccessibiltyAction. + * Indicates executeAction parameter. * + * @typedef {_Parameter} * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @systemapi * @since 20 */ -export { Parameter } from './application/AccessibilityExtensionContext'; +export type Parameter = _Parameter; /** * The accessibility extension context. Used to configure, query information, and inject gestures. @@ -231,7 +232,7 @@ export default class AccessibilityExtensionAbility { * @systemapi * @since 20 */ -declare interface AccessibilityEventInfo { +export declare interface AccessibilityEventInfo { /** * EventType * @@ -281,7 +282,7 @@ declare interface AccessibilityEventInfo { * @syscap SystemCapability.BarrierFree.Accessibility.Core * @since 9 */ -declare interface AccessibilityEvent { +export declare interface AccessibilityEvent { /** * EventType * diff --git a/api/@ohos.application.BackupExtensionAbility.d.ts b/api/@ohos.application.BackupExtensionAbility.d.ts index a03b3095196ecc5863cf928d630896c9556a9af2..147010c2a5ca8b556eeddb4e945458e2e3b53391 100644 --- a/api/@ohos.application.BackupExtensionAbility.d.ts +++ b/api/@ohos.application.BackupExtensionAbility.d.ts @@ -168,6 +168,32 @@ declare class BackupExtensionAbility { * @since 20 */ onRelease(scenario: number): Promise; + + /** + * Callback to be called when getting application backup compatibilityInfo. + * Developer could override this method to provide the backup compatibilityInfo. + * + * @param { string } extInfo Information about the capabilities of the peer. + * @returns { Promise } Return backup compatibilityInfo, support promise. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @StageModelOnly + * @since 20 + */ + getBackupCompatibilityInfo(extInfo: string) : Promise; + + /** + * Callback to be called when getting application restore compatibilityInfo. + * Developer could override this method to provide the restore compatibilityInfo. + * + * @param { string } extInfo Information about the capabilities of the peer. + * @returns { Promise } Return restore compatibilityInfo, support promise. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @StageModelOnly + * @since 20 + */ + getRestoreCompatibilityInfo(extInfo: string) : Promise; } export default BackupExtensionAbility; diff --git a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts index d238b3dcf966ef794b4a001cf76b596e00355d1d..e7333287a0dfa0f3c516504bf84687dec04013e3 100644 --- a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts +++ b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts @@ -27,9 +27,10 @@ import StaticSubscriberExtensionContext from './@ohos.application.StaticSubscrib * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class StaticSubscriberExtensionAbility { +declare class StaticSubscriberExtensionAbility { /** * Indicates configuration information about an ability context. * @@ -37,7 +38,8 @@ export default class StaticSubscriberExtensionAbility { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ context: StaticSubscriberExtensionContext; @@ -48,7 +50,10 @@ export default class StaticSubscriberExtensionAbility { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onReceiveEvent(event: CommonEventData): void; } + +export default StaticSubscriberExtensionAbility; diff --git a/api/@ohos.application.StaticSubscriberExtensionContext.d.ts b/api/@ohos.application.StaticSubscriberExtensionContext.d.ts index ebb8029c2d275b3d773c8ede4209d7c07bcb20fd..3f0ec67704e23c18c1d2b46cdf6c7bab81220d00 100644 --- a/api/@ohos.application.StaticSubscriberExtensionContext.d.ts +++ b/api/@ohos.application.StaticSubscriberExtensionContext.d.ts @@ -29,9 +29,10 @@ import ExtensionContext from './application/ExtensionContext'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ -export default class StaticSubscriberExtensionContext extends ExtensionContext { +declare class StaticSubscriberExtensionContext extends ExtensionContext { /** * Starts a new ability. If the caller application is in foreground, you can use this method to start ability; * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND. @@ -60,7 +61,8 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, callback: AsyncCallback): void; @@ -92,7 +94,9 @@ export default class StaticSubscriberExtensionContext extends ExtensionContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want): Promise; } +export default StaticSubscriberExtensionContext; diff --git a/api/@ohos.application.WindowExtensionAbility.d.ts b/api/@ohos.application.WindowExtensionAbility.d.ts index ee8a1b08b9e62f0ee78024a3c5e7f096aeffa47f..b5810d91a6c07bcc129b41cf24aae909627a4b38 100644 --- a/api/@ohos.application.WindowExtensionAbility.d.ts +++ b/api/@ohos.application.WindowExtensionAbility.d.ts @@ -30,8 +30,9 @@ import window from './@ohos.window'; * @systemapi hide for inner use. * @StageModelOnly * @since 9 + * @deprecated since 21 */ -export default class WindowExtensionAbility { +declare class WindowExtensionAbility { /** * Indicates window extension ability context. * @@ -40,6 +41,7 @@ export default class WindowExtensionAbility { * @systemapi hide for inner use. * @StageModelOnly * @since 9 + * @deprecated since 21 */ context: WindowExtensionContext; @@ -51,6 +53,7 @@ export default class WindowExtensionAbility { * @systemapi hide for inner use. * @StageModelOnly * @since 9 + * @deprecated since 21 */ onConnect(want: Want): void; @@ -62,6 +65,7 @@ export default class WindowExtensionAbility { * @systemapi hide for inner use. * @StageModelOnly * @since 9 + * @deprecated since 21 */ onDisconnect(want: Want): void; @@ -73,10 +77,13 @@ export default class WindowExtensionAbility { * @systemapi hide for inner use. * @StageModelOnly * @since 9 + * @deprecated since 21 */ onWindowReady(window: window.Window): void; } +export default WindowExtensionAbility; + /** * The context of window extension. It allows access to * windowExtension-specific resources. @@ -86,5 +93,6 @@ export default class WindowExtensionAbility { * @systemapi * @stagemodelonly * @since 9 + * @deprecated since 21 */ export type WindowExtensionContext = _WindowExtensionContext; diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 41eedb71973c5f15a64929c1e5b46699e83f3878..2bdd74bd99e0909843b32bf275a0a86d2448a67b 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -23,7 +23,8 @@ * * @namespace formError * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formError { /** @@ -31,14 +32,16 @@ declare namespace formError { * * @enum { number } * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormError { /** * A common internal error occurs during form processing. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_COMMON = 1, @@ -48,7 +51,8 @@ declare namespace formError { * and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PERMISSION_DENY = 2, @@ -58,7 +62,8 @@ declare namespace formError { * consistent with those provided by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_INFO_FAILED = 4, @@ -67,7 +72,8 @@ declare namespace formError { * Ensure that the bundle to which the form to be added belongs is available. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_BUNDLE_FAILED = 5, @@ -76,7 +82,8 @@ declare namespace formError { * Ensure that the grid style of the form is supported by the form provider. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_GET_LAYOUT_FAILED = 6, @@ -85,7 +92,8 @@ declare namespace formError { * parameters are valid. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_ADD_INVALID_PARAM = 7, @@ -94,7 +102,8 @@ declare namespace formError { * different from that obtained for the first time. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CFG_NOT_MATCH_ID = 8, @@ -102,7 +111,8 @@ declare namespace formError { * The ID of the form to be operated does not exist in the Form Manager Service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_NOT_EXIST_ID = 9, @@ -110,7 +120,8 @@ declare namespace formError { * Failed to bind the Form Manager Service to the provider service. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_BIND_PROVIDER_FAILED = 10, @@ -118,7 +129,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_FORMS = 11, @@ -127,7 +139,8 @@ declare namespace formError { * exceeds the maximum allowed by the system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_INSTANCES_PER_FORM = 12, @@ -136,7 +149,8 @@ declare namespace formError { * operated by the current application. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_OPERATION_FORM_NOT_SELF = 13, @@ -144,7 +158,8 @@ declare namespace formError { * The Form Manager Service failed to instruct the form provider to delete the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_PROVIDER_DEL_FAIL = 14, @@ -152,7 +167,8 @@ declare namespace formError { * The total number of added forms exceeds the maximum per client. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_FORMS_PER_CLIENT = 15, @@ -160,7 +176,8 @@ declare namespace formError { * The total number of added temp forms exceeds the maximum in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_MAX_SYSTEM_TEMP_FORMS = 16, @@ -168,7 +185,8 @@ declare namespace formError { * The module can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_MODULE = 17, @@ -176,7 +194,8 @@ declare namespace formError { * The ability can not be find in system. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_ABILITY = 18, @@ -184,7 +203,8 @@ declare namespace formError { * The dimension is not exist in the form. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_NO_SUCH_DIMENSION = 19, @@ -192,7 +212,8 @@ declare namespace formError { * The ability is not installed. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_FA_NOT_INSTALLED = 20, @@ -201,7 +222,8 @@ declare namespace formError { * the service is not started.Please try again after the service is started. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_SYSTEM_RESPONSES_FAILED = 30, @@ -213,7 +235,8 @@ declare namespace formError { * the request parameters. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_FORM_DUPLICATE_ADDED = 31, @@ -222,7 +245,8 @@ declare namespace formError { * the restoration is complete. * * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_IN_RECOVERY = 36, @@ -231,7 +255,8 @@ declare namespace formError { * * @syscap SystemCapability.Ability.Form * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ERR_DISTRIBUTED_SCHEDULE_FAILED = 37 } diff --git a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts index d8561313e21dd5a07ef7928df922a4c686f209f0..2fdcf701cb1331770ad901b9a7ee65baeda6f9b3 100755 --- a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts +++ b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts @@ -275,6 +275,15 @@ declare class ArcAlphabetIndexerAttribute extends CommonMethod { * @atomicservice * @since 18 */ +/** + * Defines the ArcSwiper Component that can provide the ability for sub components to swipe and display. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @uicomponent + * @since 19 + */ declare let ArcSwiper: ArcSwiperInterface; /** diff --git a/api/@ohos.arkui.StateManagement.d.ts b/api/@ohos.arkui.StateManagement.d.ts index 1b53279d976244bc51cb7de750e2316115561823..0dd72341dbf686962175e67e89e06be6c0cfe80e 100644 --- a/api/@ohos.arkui.StateManagement.d.ts +++ b/api/@ohos.arkui.StateManagement.d.ts @@ -18,7 +18,7 @@ * @kit ArkUI */ -import contextConstant from '@ohos.app.ability.contextConstant' +import contextConstant from '@ohos.app.ability.contextConstant'; /** * Function that returns default creator. @@ -318,10 +318,43 @@ export declare class UIUtils { */ static enableV2Compatibility(source: T): T; - /** - * Creates read-only data binding. + /** + * Dynamically add monitor for state variable change. * + * @param { object } target class instance or custom component instance. + * @param { string | string[] } path monitored change for state variable. + * @param { MonitorCallback } monitorCallback the function that triggers the callback when state variable change. + * @param { MonitorOptions} [options] the monitor configuration parameter. + * @throws { BusinessError } 130000 - The target is not a custom component instance or V2 class instance. + * @throws { BusinessError } 130001 - The path is invalid. + * @throws { BusinessError } 130002 - monitorCallback is not a function or an anonymous function. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static addMonitor(target: object, path: string | string[], monitorCallback: MonitorCallback, options?: MonitorOptions): void; + + /** + * Dynamically clear monitor callback for state variable change. * + * @param { object } target class instance or custom component instance. + * @param { string | string[] } path monitored change for state variable. + * @param { MonitorCallback } [monitorCallback] the function that triggers the callback when state variable change. + * @throws { BusinessError } 130000 - The target is not a custom component instance or V2 class instance. + * @throws { BusinessError } 130001 - The path is invalid. + * @throws { BusinessError } 130002 - monitorCallback is not a function or an anonymous function. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static clearMonitor(target: object, path: string | string[], monitorCallback?: MonitorCallback) : void; + + /** + * Creates read-only data binding. * Example. UIUtils.makeBinding(()=>this.num); * * Supports simple getters for read-only data. @@ -361,6 +394,42 @@ export declare class UIUtils { static makeBinding(getter: GetterCallback, setter: SetterCallback): MutableBinding; } +/** + * Function that returns monitor instance value when state variable is changed. + * + * @typedef { function } MonitorCallback + * @param { IMonitor} monitorValue monitor instance value when state variable is changed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare type MonitorCallback = (monitorValue: IMonitor) => void; + +/** + * Define Monitor options. + * + * @interface MonitorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export interface MonitorOptions { + /** + * Used to determine whether the state variable change is + * triggered synchronously or asynchronously. The default value is false. + * + * @type { ?boolean } isSynchronous parameter + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + isSynchronous?: boolean; +} + /** * Getter callback type. It is used to get value. * @@ -430,5 +499,5 @@ export declare class MutableBinding { * @atomicservice * @since 20 */ - set value(newValue: T): void; + set value(newValue: T); } \ No newline at end of file diff --git a/api/@ohos.arkui.UIContext.d.ets b/api/@ohos.arkui.UIContext.d.ets deleted file mode 100644 index ad231bd85d0910cad79f06ef01280832cbf539af..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.UIContext.d.ets +++ /dev/null @@ -1,2706 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - - -import font from './@ohos.font'; -import mediaQuery from './@ohos.mediaquery'; -import inspector from './@ohos.arkui.inspector'; -import observer from './@ohos.arkui.observer'; -import promptAction from './@ohos.promptAction'; -import router from './@ohos.router'; -import componentUtils from './@ohos.arkui.componentUtils'; -import { ComponentContent, FrameNode } from './@ohos.arkui.node'; -import { AnimatorOptions, AnimatorResult } from './@ohos.animator'; -import { Callback, AsyncCallback } from './@ohos.base'; -import { MeasureOptions } from './@ohos.measure'; -import componentSnapshot from './@ohos.arkui.componentSnapshot'; -import dragController from './@ohos.arkui.dragController'; -import image from './@ohos.multimedia.image'; -import common from './@ohos.app.ability.common'; -import pointer from './@ohos.multimodalInput.pointer'; -import { ClickEvent,CustomBuilder,ExpectedFrameRateRange,DragItemInfo,AnimateParam,KeyframeAnimateParam,KeyframeState,SheetOptions } from './arkui/component/common' -import { GestureEvent } from './arkui/component/gesture' -import { ResourceStr,SizeOptions } from './arkui/component/units' -import { Nullable } from './arkui/component/enums' -import { LocalStorage } from '@ohos.arkui.stateManagement'; -import { Color,FontStyle,WidthBreakpoint,HeightBreakpoint } from './arkui/component/enums' - -/** - * class Font - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class Font { - - /** - * Register a customized font in the FontManager. - * - * @param { font.FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - registerFont(options: font.FontOptions): void; - - - /** - * Gets a list of fonts supported by system. - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - getSystemFontList(): Array; - - - /** - * Get font details according to the font name. - * @param { string } fontName - font name - * @returns { font.FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - getFontByName(fontName: string): font.FontInfo; -} - - -/** - * class MediaQuery - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class MediaQuery { - - /** - * Sets the media query criteria and returns the corresponding listening handle - * - * @param { string } condition - media conditions - * @returns { mediaQuery.MediaQueryListener } the corresponding listening handle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - matchMediaSync(condition: string): mediaQuery.MediaQueryListener; -} - - -/** - * class UIInspector - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class UIInspector { - - /** - * Sets the component after layout or draw criteria and returns the corresponding listening handle - * @param { string } id - component id. - * @returns { inspector.ComponentObserver } create listener for observer component event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - createComponentObserver(id: string): inspector.ComponentObserver; -} - - - -/** - * class Router - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class Router { - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * - * @param { router.RouterOptions } options - Options. - * @param { AsyncCallback } callback - the callback of pushUrl. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushUrl(options: router.RouterOptions, callback: AsyncCallback): void; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * - * @param { router.RouterOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushUrl(options: router.RouterOptions): Promise; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * - * @param { router.RouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @param { AsyncCallback } callback - the callback of pushUrl. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * - * @param { router.RouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * - * @param { router.RouterOptions } options - Options. - * @param { AsyncCallback } callback - the callback of replaceUrl. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceUrl(options: router.RouterOptions, callback: AsyncCallback): void; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * - * @param { router.RouterOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceUrl(options: router.RouterOptions): Promise; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * - * @param { router.RouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @param { AsyncCallback } callback - the callback of replaceUrl. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * - * @param { router.RouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. - * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; - - - /** - * Returns to the previous page or a specified page. - * - * @param { router.RouterOptions } options - Options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - back(options?: router.RouterOptions): void; - - /** - * Returns to the specified page. - * - * @param { number } index - index of page. - * @param { Object } [params] - params of page. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - back(index: number, params?: Object): void; - - - /** - * Clears all historical pages and retains only the current page at the top of the stack. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - clear(): void; - - - /** - * Obtains the number of pages in the current stack. - * - * @returns { string } Number of pages in the stack. The maximum value is 32. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getLength(): string; - - - /** - * Obtains information about the current page state. - * - * @returns { router.RouterState } Page state. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getState(): router.RouterState; - - /** - * Obtains page information by index. - * - * @param { number } index - Index of page. - * @returns { router.RouterState | undefined } Page state. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getStateByIndex(index: number): router.RouterState | undefined; - - /** - * Obtains page information by url. - * - * @param { string } url - URL of page. - * @returns { Array } Page state. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getStateByUrl(url: string): Array; - - - /** - * Pop up alert dialog to ask whether to back. - * - * @param { router.EnableAlertOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showAlertBeforeBackPage(options: router.EnableAlertOptions): void; - - - /** - * Hide alert before back page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - hideAlertBeforeBackPage(): void; - - - /** - * Obtains information about the current page params. - * - * @returns { Object } Page params. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getParams(): Object; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * @param { router.NamedRouterOptions } options - Options. - * @param { AsyncCallback } callback - the callback of pushNamedRoute. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * @param { router.NamedRouterOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushNamedRoute(options: router.NamedRouterOptions): Promise; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * @param { router.NamedRouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @param { AsyncCallback } callback - the callback of pushNamedRoute. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; - - - /** - * Navigates to a specified page in the application based on the page URL and parameters. - * @param { router.NamedRouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * @param { router.NamedRouterOptions } options - Options. - * @param { AsyncCallback } callback - the callback of replaceNamedRoute. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * @param { router.NamedRouterOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not string. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceNamedRoute(options: router.NamedRouterOptions): Promise; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * @param { router.NamedRouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @param { AsyncCallback } callback - the callback of replaceNamedRoute. - * @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not string. - * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the standard system. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; - - - /** - * Replaces the current page with another one in the application. The current page is destroyed after replacement. - * @param { router.NamedRouterOptions } options - Options. - * @param { router.RouterMode } mode - RouterMode. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard system. - * @throws { BusinessError } 100004 - Named route error. The named route does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; -} - - -/** - * class PromptAction - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class PromptAction { - - /** - * Displays the notification text. - * - * @param { promptAction.ShowToastOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showToast(options: promptAction.ShowToastOptions): void; - - /** - * Displays the notification text. - * - * @param { promptAction.ShowToastOptions } options - Options. - * @returns { Promise } return the toast id that will be used by closeToast. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 - */ - openToast(options: promptAction.ShowToastOptions): Promise; - - /** - * Close the notification text. - * - * @param { number } toastId - the toast id that returned by openToast. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 - */ - closeToast(toastId: number): void; - - - - /** - * Displays the dialog box. - * - * @param { promptAction.ShowDialogOptions } options - Options. - * @param { AsyncCallback } callback - the callback of showDialog. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback): void; - - - /** - * Displays the dialog box. - * - * @param { promptAction.ShowDialogOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showDialog(options: promptAction.ShowDialogOptions): Promise; - - /** - * Displays the menu. - * - * @param { promptAction.ActionMenuOptions } options - Options. - * @param { promptAction.ActionMenuSuccessResponse } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - * @deprecated since 11 - * @useinstead showActionMenu - */ - // showActionMenu(options: promptAction.ActionMenuOptions, callback: promptAction.ActionMenuSuccessResponse): void; - - /** - * Displays the menu. - * - * @param { promptAction.ActionMenuOptions } options - Options. - * @param { AsyncCallback } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback): void; - - - /** - * Displays the menu. - * - * @param { promptAction.ActionMenuOptions } options - Options. - * @returns { Promise } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - showActionMenu(options: promptAction.ActionMenuOptions): Promise; - - /** - * Open the custom dialog with frameNode. - * - * @param { ComponentContent } dialogContent - the content of custom dialog. - * @param { promptAction.BaseDialogOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 103301 - the ComponentContent is incorrect. - * @throws { BusinessError } 103302 - Dialog content already exists. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - openCustomDialog(dialogContent: ComponentContent, options: promptAction.BaseDialogOptions): Promise; - - /** - * Update the custom dialog with frameNode. - * - * @param { ComponentContent } dialogContent - the content of custom dialog. - * @param { promptAction.BaseDialogOptions } options - Options. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 103301 - the ComponentContent is incorrect. - * @throws { BusinessError } 103303 - the ComponentContent cannot be found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - updateCustomDialog(dialogContent: ComponentContent, options: promptAction.BaseDialogOptions): Promise; - - /** - * Close the custom dialog with frameNode. - * - * @param { ComponentContent } dialogContent - the content of custom dialog. - * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 103301 - the ComponentContent is incorrect. - * @throws { BusinessError } 103303 - the ComponentContent cannot be found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - closeCustomDialog(dialogContent: ComponentContent): Promise; - - /** - * Open the custom dialog. - * - * @param { promptAction.CustomDialogOptions } options - Options. - * @returns { Promise } return the dialog id that will be used by closeCustomDialog. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - openCustomDialog(options: promptAction.CustomDialogOptions): Promise; - - /** - * Close the custom dialog. - * - * @param { number } dialogId - the dialog id that returned by openCustomDialog. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - closeCustomDialog(dialogId: number): void; -} - -/** - * Defines the callback type used in UIObserver watch click event. - * The value of event indicates the information of ClickEvent. - * The value of node indicates the frameNode which will receive the event. - * - * @typedef { function } ClickEventListenerCallback - * @param { ClickEvent } event - the information of ClickEvent - * @param { FrameNode } [node] - the information of frameNode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; - -/** - * Defines the callback type used in UIObserver watch gesture. - * The value of event indicates the information of gesture. - * The value of node indicates the frameNode which will receive the event. - * - * @typedef { function } GestureEventListenerCallback - * @param { GestureEvent } event - the information of GestureEvent - * @param { FrameNode } [node] - the information of frameNode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; - -/** - * Defines the PageInfo type. - * The value of routerPageInfo indicates the information of the router page, or undefined if the - * frameNode does not have router page information. And the value of navDestinationInfo indicates - * the information of the navDestination, or undefined if the frameNode does not have navDestination - * information. - * - * @interface PageInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export interface PageInfo { - /** - * the property of router page information. - * - * @type { ?observer.RouterPageInfo } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - routerPageInfo?: observer.RouterPageInfo; - - /** - * the property of navDestination information. - * - * @type { ?observer.NavDestinationInfo } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - navDestinationInfo?: observer.NavDestinationInfo; -} - -export interface NavigationOptions { navigationId: ResourceStr } - -/** - * Register callbacks to observe ArkUI behavior. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class UIObserver { - on(type: string, options: T, callback:Callback):void; - off(type:string, options: T, callback: Callback):void; - on(type: string, callback:Callback):void; - off(type:string, callback: Callback):void; - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { object } options - Specify the id of observed navigation. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { object } options - The options object. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'navDestinationUpdate', options: NavigationOptions, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { object } options - Specify the id of observed navigation. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * navigation ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { object } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * navigation ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'navDestinationUpdate', options: NavigationOptions, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'navDestinationUpdate', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'navDestinationUpdate', callback: Callback): void; - - // /** - // * Registers a callback function to be called when the scroll event start or stop. - // * - // * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'. - // * @param { observer.ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to be called when the scroll event start or stop. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'scrollEvent' } type - The type of event to remove the listener for. Must be 'scrollEvent'. - // * @param { observer.ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * scroll ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback): void; - - // /** - // * Registers a callback function to be called when the scroll event start or stop. - // * - // * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'. - // * @param { Callback } callback - The callback function to be called when the scroll event start or stop. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'scrollEvent', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'scrollEvent'} type - The type of event to remove the listener for. Must be 'scrollEvent'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'scrollEvent', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the router page in a ui context is updated. - // * - // * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. - // * @param { Callback } callback - The callback function to be called when the router page is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Registers a callback function to be called when the router page in a ui context is updated. - // * - // * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. - // * @param { Callback } callback - The callback function to be called when the router page is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'routerPageUpdate', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'routerPageUpdate', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the screen density in a ui context is updated. - // * - // * @param { 'densityUpdate' } type - The type of event to listen for. Must be 'densityUpdate'. - // * @param { Callback } callback - The callback function to be called when the screen density is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'densityUpdate', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'densityUpdate' } type - The type of event to remove the listener for. Must be 'densityUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'densityUpdate', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the draw command will be drawn. - // * - // * @param { 'willDraw' } type - The type of event to listen for. Must be 'willDraw'. - // * @param { Callback } callback - The callback function to be called when the draw command will be drawn. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'willDraw', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'willDraw' } type - The type of event to remove the listener for. Must be 'willDraw'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'willDraw', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the layout is done. - // * - // * @param { 'didLayout' } type - The type of event to listen for. Must be 'didLayout'. - // * @param { Callback } callback - The callback function to be called when the layout is done. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'didLayout', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'didLayout' } type - The type of event to remove the listener for. Must be 'didLayout'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'didLayout', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the navigation switched to a new navDestination. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'. - // * @param { Callback } callback - The callback function to be called when the navigation switched to a new navDestination. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on( - // type: 'navDestinationSwitch', - // callback: Callback - // ): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off( - // type: 'navDestinationSwitch', - // callback?: Callback - // ): void; - - // /** - // * Registers a callback function to be called when the navigation switched to a new navDestination. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'. - // * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options. - // * @param { Callback } callback - The callback function to be called when the navigation switched to a new navDestination. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on( - // type: 'navDestinationSwitch', - // observerOptions: observer.NavDestinationSwitchObserverOptions, - // callback: Callback - // ): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'. - // * @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off( - // type: 'navDestinationSwitch', - // observerOptions: observer.NavDestinationSwitchObserverOptions, - // callback?: Callback - // ): void; - - // /** - // * Registers a callback function to be called before clickEvent is called. - // * - // * @param { 'willClick' } type - The type of event to listen for. - // * @param { ClickEventListenerCallback } callback - The callback function to be called - // * when the clickEvent will be trigger or after. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'willClick', callback: ClickEventListenerCallback): void; - - // /** - // * Removes a callback function to be called before clickEvent is called. - // * - // * @param { 'willClick' } type - The type of event to remove the listener for. - // * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided, - // * all callbacks for the given event type will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'willClick', callback?: ClickEventListenerCallback): void; - - // /** - // * Registers a callback function to be called after clickEvent is called. - // * - // * @param { 'didClick' } type - The type of event to listen for. - // * @param { ClickEventListenerCallback } callback - The callback function to be called - // * when the clickEvent will be trigger or after. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'didClick', callback: ClickEventListenerCallback): void; - - // /** - // * Removes a callback function to be called after clickEvent is called. - // * - // * @param { 'didClick' } type - The type of event to remove the listener for. - // * @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided, - // * all callbacks for the given event type will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'didClick', callback?: ClickEventListenerCallback): void; - - // /** - // * Registers a callback function to be called before tapGesture is called. - // * - // * @param { 'willClick' } type - The type of event to listen for. - // * @param { GestureEventListenerCallback } callback - The callback function to be called - // * when the clickEvent will be trigger or after. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'willClick', callback: GestureEventListenerCallback): void; - - // /** - // * Removes a callback function to be called before tapGesture is called. - // * - // * @param { 'willClick' } type - The type of event to remove the listener for. - // * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided, - // * all callbacks for the given event type will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'willClick', callback?: GestureEventListenerCallback): void; - - // /** - // * Registers a callback function to be called after tapGesture is called. - // * - // * @param { 'didClick' } type - The type of event to listen for. - // * @param { GestureEventListenerCallback } callback - The callback function to be called - // * when the clickEvent will be trigger or after. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'didClick', callback: GestureEventListenerCallback): void; - - // /** - // * Removes a callback function to be called after tapGesture is called. - // * - // * @param { 'didClick' } type - The type of event to remove the listener for. - // * @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided, - // * all callbacks for the given event type will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'didClick', callback?: GestureEventListenerCallback): void; - - // /** - // * Registers a callback function to be called when the tabContent is showed or hidden. - // * - // * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'. - // * @param { observer.ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to be called - // * when the tabContent show or hide. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'tabContentUpdate' } type - The type of event to remove the listener for. Must be 'tabContentUpdate'. - // * @param { observer.ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, - // * all callbacks for the given event type and Tabs ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the tabContent is showed or hidden. - // * - // * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'. - // * @param { Callback } callback - The callback function to be called - // * when the tabContent is showed or hidden. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // on(type: 'tabContentUpdate', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'tabContentUpdate'} type - The type of event to remove the listener for. Must be 'tabContentUpdate'. - // * @param { Callback } callback - The callback function to remove. If not provided, - // * all callbacks for the given event type and Tabs ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // off(type: 'tabContentUpdate', callback?: Callback): void; -} - - -/** - * class ComponentUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class ComponentUtils { - - /** - * Provide the ability to obtain the coordinates and size of component drawing areas. - * - * @param { string } id - ID of the component whose attributes are to be obtained. - * @returns { componentUtils.ComponentInfo } the object of ComponentInfo. - * @throws { BusinessError } 100001 - UI execution context not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - getRectangleById(id: string): componentUtils.ComponentInfo; -} - -/** - * class OverlayManager - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class OverlayManager { - /** - * Add the ComponentContent to the OverlayManager. - * - * @param { ComponentContent } content - The content will be added to the OverlayManager. - * @param { number } [ index ] - The index at which to add the ComponentContent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - addComponentContent(content: ComponentContent, index?: number): void; - - /** - * Remove the ComponentContent from the OverlayManager. - * - * @param { ComponentContent } content - The content will be removed from the OverlayManager. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - removeComponentContent(content: ComponentContent): void; - - /** - * Show the ComponentContent. - * - * @param { ComponentContent } content - The content will be shown. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - showComponentContent(content: ComponentContent): void; - - /** - * Hide the ComponentContent. - * - * @param { ComponentContent } content - The content will be hidden. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - hideComponentContent(content: ComponentContent): void; - - /** - * Show all ComponentContents on the OverlayManager. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - showAllComponentContents(): void; - - /** - * Hide all ComponentContents on the OverlayManager. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - hideAllComponentContents(): void; -} - - -/** - * interface AtomicServiceBar - * @interface AtomicServiceBar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export interface AtomicServiceBar { - /** - * Set the visibility of the bar, except the icon. - * - * @param { boolean } visible - whether this bar is visible. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - setVisible(visible: boolean): void; - - - /** - * Set the background color of the bar. - * - * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setBackgroundColor(color: Nullable< Color | number | string>): void; - - - /** - * Set the title of the bar. - * - * @param { string } content - the content of the bar. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setTitleContent(content: string): void; - - - /** - * Set the font style of the bar's title. - * - * @param { FontStyle } font - the font style of the bar's title. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setTitleFontStyle(font: FontStyle): void; - - - /** - * Set the color of the icon on the bar. - * - * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setIconColor(color: Nullable< Color | number | string>): void; -} - -/** - * Represents a dynamic synchronization scene. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class DynamicSyncScene { - /** - * Sets the FrameRateRange of the DynamicSyncScene. - * - * @param { ExpectedFrameRateRange } range - The range of frameRate. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setFrameRateRange(range: ExpectedFrameRateRange): void; - - /** - * Gets the FrameRateRange of the DynamicSyncScene. - * - * @returns { ExpectedFrameRateRange } The range of frameRate. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getFrameRateRange(): ExpectedFrameRateRange; -} - -/** - * Represents a dynamic synchronization scene of Swiper. - * - * @extends DynamicSyncScene - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class SwiperDynamicSyncScene extends DynamicSyncScene { - /** - * Type of the SwiperDynamicSyncSceneType. - * @type { SwiperDynamicSyncSceneType } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - readonly type: SwiperDynamicSyncSceneType; -} - -/** - * Represents a dynamic synchronization scene of Marquee. - * - * @extends DynamicSyncScene - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ -export declare class MarqueeDynamicSyncScene extends DynamicSyncScene { - /** - * Type of the MarqueeDynamicSyncSceneType. - * @type { MarqueeDynamicSyncSceneType } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ - readonly type: MarqueeDynamicSyncSceneType; -} - - -/** - * class DragController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class DragController { - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { dragController.DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback } callback - Callback that contains - * the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, - callback: AsyncCallback): void; - - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { dragController.DragInfo } dragInfo - Information about the drag event. - * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) - : Promise; - - - /** - * Create one drag action object, which can be used for starting drag later or monitoring the drag status after drag started. - * @param { Array } customArray - Objects used for prompts displayed when the objects are dragged. - * @param { dragController.DragInfo } dragInfo - Information about the drag event. - * @returns { dragController.DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - createDragAction(customArray: Array, dragInfo: dragController.DragInfo): dragController.DragAction; - - - /** - * Get a drag preview object. - * @returns { dragController.DragPreview } A drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getDragPreview(): dragController.DragPreview; - - /** - * Enable drag event strict reporting for drag enter and leave notification in nested situation. - * For example, the parent and child both register the onDragEnter/onDragLeave events, if this - * flag is enabled, the parent will be notified with leave event, and the child will notified with - * enter event at the same time, when user drag action is passing through the parent and enter the - * scope of the child. - * Please be noted, the default value of the flag is false, it means, for the same situation, the - * parent will not receive the leave notification, just the child can get the enter event, which is - * not fully strict. - * @param { boolean } enable - Indicating enable drag event strict reporting or not. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setDragEventStrictReportingEnabled(enable: boolean): void; -} - -/** - * class MeasureUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class MeasureUtils { - /** - * Obtains the width of the specified text in a single line layout. - * - * @param { MeasureOptions } options - Options. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - measureText(options: MeasureOptions): number; - - /** - * Obtains the width and height of the specified text in a single line layout. - * - * @param { MeasureOptions } options - Options of measure area occupied by text. - * @returns { SizeOptions } width and height for text to display - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - measureTextSize(options: MeasureOptions): SizeOptions; -} - -/** - * class FocusController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class FocusController { - /** - * clear focus to the root container. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - clearFocus(): void; - - /** - * request focus to the specific component. - * @param { string } key - the inspector key of the component. - * @throws { BusinessError } 150001 - the component cannot be focused. - * @throws { BusinessError } 150002 - This component has an unfocusable ancestor. - * @throws { BusinessError } 150003 - the component is not on tree or does not exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - requestFocus(key: string): void; - - /** - * Activate focus style. - * @param { boolean } isActive - activate/deactivate the focus style. - * @param { boolean } [autoInactive] - deactivate the focus style when touch event or mouse event triggers, the default value is true. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - activate(isActive: boolean, autoInactive?: boolean): void; -} - -/** - * Pointer style. - * - * @typedef {pointer.PointerStyle} PointerStyle - * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @atomicservice - * @since 12 - */ -export type PointerStyle = pointer.PointerStyle; - -/** - * class CursorController - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class CursorController { - /** - * Restore default cursor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - restoreDefault(): void; - /** - * Set cursor style. - * - * @param { PointerStyle } value - cursor style enum. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - setCursor(value: PointerStyle): void; -} - -/** - * class ContextMenuController - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class ContextMenuController { - /** - * Close context menu. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - close(): void; -} - -/** - * Class FrameCallback - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare abstract class FrameCallback { - /** - * Call when a new display frame is being rendered. - * - * @param { number } frameTimeInNano - The frame time in nanoseconds. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onFrame(frameTimeInNano: number): void; - - /** - * Called at the end of the next idle frame. If there is no next frame, will request one automatically. - * - * @param { number } timeLeftInNano - The remaining time from the deadline for this frame. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onIdle(timeLeftInNano: number): void; -} - -/** - * The base context of an ability or an application. It allows access to - * application-specific resources. - * - * @typedef { common.Context } Context - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - * @crossplatform - * @atomicservice - * @since 12 - */ -export type Context = common.Context; - -/** - * class ComponentSnapshot - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class ComponentSnapshot { - /** - * Get a component snapshot by component id. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - get(id: string, callback: AsyncCallback, options?: componentSnapshot.SnapshotOptions): void; - - /** - * Get a component snapshot by component id. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - get(id: string, options?: componentSnapshot.SnapshotOptions): Promise; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, - delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - createFromBuilder(builder: CustomBuilder, delay?: number, - checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; - - /** - * Take a screenshot of the specified component in synchronous mode, - * this mode will block the main thread, please use it with caution, the maximum - * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. - * @returns { image.PixelMap } The snapshot result in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @throws { BusinessError } 160002 - Timeout. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; -} - - -/** - * class UIContext - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare class UIContext { - - /** - * get object font. - * - * @returns { Font } object Font. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getFont(): Font; - - - /** - * get object mediaQuery. - * - * @returns { MediaQuery } object MediaQuery. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getMediaQuery(): MediaQuery; - - - /** - * get object UIInspector. - * @returns { UIInspector } object UIInspector. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getUIInspector(): UIInspector; - - /** - * get the filtered attributes of the component tree. - * @param { Array } [filters] - the list of filters used to filter out component tree to be obtained. - * @returns { string } the specified attributes of the component tree in json string. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getFilteredInspectorTree(filters?: Array): string; - - /** - * get the filtered attributes of the component tree with the specified id and depth - * @param { string } id - ID of the specified component tree to be obtained. - * @param { number } depth - depth of the component tree to be obtained. - * @param { Array } [filters] - the list of filters used to filter out component tree to be obtained. - * @returns { string } the specified attributes of the component tree in json string. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getFilteredInspectorTreeById(id: string, depth: number, filters?: Array): string; - - - /** - * get object router. - * - * @returns { Router } object Router. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getRouter(): Router; - - - /** - * get object PromptAction. - * - * @returns { PromptAction } object PromptAction. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getPromptAction(): PromptAction; - - - /** - * get object ComponentUtils. - * @returns { ComponentUtils } object ComponentUtils. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getComponentUtils(): ComponentUtils; - - - /** - * Get the UI observer. - * - * @returns { UIObserver } The UI observer. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getUIObserver(): UIObserver; - - /** - * Get object OverlayManager. - * - * @returns { OverlayManager } object OverlayManager. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getOverlayManager(): OverlayManager; - - - /** - * Create an animator object for custom animation. - * - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - createAnimator(options: AnimatorOptions): AnimatorResult; - - - /** - * Defining animation function - * - * @param { AnimateParam } value - parameters for animation. - * @param { function } event - the closure base on which, the system will create animation automatically - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - animateTo(value: AnimateParam, event: () => void): void; - - /** - * Run custom functions inside the UIContext scope. - * - * @param { function } callback - The function called through UIContext. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - runScopedTask(callback: () => void): void; - - /** - * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET - * - * @param { KeyboardAvoidMode } value - The mode of keyboard avoid. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - setKeyboardAvoidMode(value: KeyboardAvoidMode): void; - - /** - * Get KeyboardAvoidMode. - * @returns { KeyboardAvoidMode } The mode of keyboard avoid. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getKeyboardAvoidMode(): KeyboardAvoidMode; - - /** - * Get AtomicServiceBar. - * @returns { Nullable } The atomic service bar. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - getAtomicServiceBar(): Nullable; - - - /** - * Get DragController. - * @returns { DragController } the DragController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getDragController(): DragController; - - /** - * Get MeasureUtils. - * @returns { MeasureUtils } the MeasureUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getMeasureUtils(): MeasureUtils; - - - /** - * Defining keyframe animation function. - * - * @param { KeyframeAnimateParam } param - overall animation parameters - * @param { Array } keyframes - all keyframe states - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array): void; - - /** - * Define animation functions for immediate distribution. - * - * @param { AnimateParam } param - Set animation effect parameters. - * @param { Callback } event - Specify the closure function that displays dynamic effects, - * and the system will automatically insert transition animations for state changes caused by the closure function. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - animateToImmediately(param: AnimateParam, event: Callback): void; - - /** - * Get FrameNode by id. - * - * @param { string } id - The id of FrameNode. - * @returns { FrameNode | null } The instance of FrameNode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getFrameNodeById(id: string): FrameNode | null; - - /** - * Get the FrameNode attached to current window by id. - * - * @param { string } id - The id of FrameNode. - * @returns { FrameNode | null } The instance of FrameNode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getAttachedFrameNodeById(id: string): FrameNode | null; - - /** - * Get FrameNode by uniqueId. - * - * @param { number } id - The uniqueId of the FrameNode. - * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getFrameNodeByUniqueId(id: number): FrameNode | null; - - /** - * Get page information of the frameNode with uniqueId. - * - * @param { number } id - The uniqueId of the target FrameNode. - * @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes - * navDestination and router page information. If the frame node does not have navDestination and - * router page information, it will return an empty object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getPageInfoByUniqueId(id: number): PageInfo; - - /** - * Get navigation information of the frameNode with uniqueId. - * - * @param { number } id - The uniqueId of the target FrameNode. - * @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the - * target uniqueId, or undefined if the frameNode is not existed or does not have navigation information. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined; - - /** - * Get FocusController. - * @returns { FocusController } the FocusController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getFocusController(): FocusController; - - /** - * Get object cursor controller. - * - * @returns { CursorController } object cursor controller. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getCursorController(): CursorController; - - /** - * Get object context menu controller. - * - * @returns { ContextMenuController } object context menu controller. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getContextMenuController(): ContextMenuController; - - /** - * Get ComponentSnapshot. - * @returns { ComponentSnapshot } the ComponentSnapshot - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getComponentSnapshot(): ComponentSnapshot; - - /** - * Converts a value in vp units to a value in px. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - vp2px(value: number): number; - - /** - * Converts a value in px units to a value in vp. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - px2vp(value: number): number; - - /** - * Converts a value in fp units to a value in px. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fp2px(value: number): number; - - /** - * Converts a value in px units to a value in fp. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - px2fp(value: number): number; - - /** - * Converts a value in lpx units to a value in px. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - lpx2px(value: number): number; - - /** - * Converts a value in px units to a value in lpx. - * @param { number } value - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - px2lpx(value: number): number; - - /** - * Get current LocalStorage shared from stage. - * - * @returns { LocalStorage | undefined } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 12 - */ - getSharedLocalStorage(): LocalStorage | undefined; - - /** - * Obtains context of the ability. - * - * @returns { Context | undefined } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 12 - */ - getHostContext(): Context | undefined; - - /** - * Dynamic dimming. - * - * @param { string } id - The id of FrameNode. - * @param { number } value - Compared to the original level of dimming.value range [0,1], - * set values less than 0 to 0 and values greater than 1 to 1. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - setDynamicDimming(id: string, value: number): void; - - /** - * Get the name of current window. - * - * @returns { string | undefined } The name of current window, or undefined if the window doesn't exist. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getWindowName(): string | undefined; - - /** - * Get the width breakpoint of current window. - * - * @returns { WidthBreakpoint } The width breakpoint of current window. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ - getWindowWidthBreakpoint(): WidthBreakpoint; - - /** - * Get the height breakpoint of current window. - * - * @returns { HeightBreakpoint } The height breakpoint of current window. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ - getWindowHeightBreakpoint(): HeightBreakpoint; - - /** - * Open the BindSheet. - * - * @param { ComponentContent } bindSheetContent - The content of BindSheet. - * @param { SheetOptions } sheetOptions - The options of sheet. - * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. - * @throws { BusinessError } 120002 - The bindSheetContent already exists. - * @throws { BusinessError } 120004 - The targetId does not exist. - * @throws { BusinessError } 120005 - The node of targetId is not in the component tree. - * @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, targetId?: number): Promise; - - /** - * Update the BindSheet with sheetOptions. - * - * @param { ComponentContent } bindSheetContent - The content of BindSheet. - * @param { SheetOptions } sheetOptions - The update options of sheet. - * @param { boolean } partialUpdate - If true, only the specified properties in the sheetOptions are updated, - * otherwise the rest of the properties are overwritten with the default values. - * Default value is false. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. - * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise; - - /** - * Close the BindSheet. - * - * @param { ComponentContent } bindSheetContent - The content of BindSheet. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. - * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - closeBindSheet(bindSheetContent: ComponentContent): Promise; - - /** - * Post a frame callback to run on the next frame. - * - * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - postFrameCallback(frameCallback: FrameCallback): void; - - /** - * Post a frame callback to run on the next frame after the specified delay. - * - * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. - * @param { number } delayTime - The delay time in milliseconds, - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; - - /** - * Require DynamicSyncScene by id. - * - * @param { string } id - The id of DynamicSyncScene. - * @returns { Array} The instance of SwiperDynamicSyncScene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - requireDynamicSyncScene(id: string): Array; - - - /** - * Clear the cache generated by using $r/$rawfile to retrieve resources. This cache is used to accelerate the process - * of repeatedly loading resources. Clearing this cache may slow down the loading speed of resources during page overload. - * - * @throws { BusinessError } 202 - The caller is not a system application. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 13 - */ - clearResourceCache(): void; - - /** - * Checks whether current font scale follows the system. - * - * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 - */ - isFollowingSystemFontScale(): boolean; - - /** - * Get the max font scale. - * - * @returns { number } The max font scale. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 - */ - getMaxFontScale(): number; - -} - -/** - * Enum of KeyBoardAvoidMethodType - * - * @enum { number } KeyBoardAvoidMethodType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - -export const enum KeyboardAvoidMode { - /** - * Default Type, offset the whole page when keyBoard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - OFFSET = 0, - - /** - * Resize Type, resize the page when keyBoard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - RESIZE = 1, - - /** - * Offset Type, offset the whole page when caret position or keyboard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - OFFSET_WITH_CARET = 2, - - /** - * Resize Type, resize the whole page when when caret position or keyboard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - RESIZE_WITH_CARET = 3, - - /** - * None Type, nothing to do when keyboard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - NONE = 4, -} - -/** - * Enum of SwiperDynamicSyncSceneType - * - * @enum { number } SwiperDynamicSyncSceneType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export const enum SwiperDynamicSyncSceneType { - /** - * Scene type is GESTURE. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - GESTURE = 0, - - /** - * Scene type is ANIMATION. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - ANIMATION = 1 -} - -/** - * Enum of scene type for Marquee - * - * @enum { number } MarqueeDynamicSyncSceneType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ -export const enum MarqueeDynamicSyncSceneType { - /** - * Scene type is ANIMATION. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ - ANIMATION = 1 -} diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts old mode 100755 new mode 100644 index 5abf099d146c609b272ac9a8efcc59701b210f74..9278165b5bd7f616acb3e86bc9c9dc9e263c4191 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -22,12 +22,14 @@ import font from './@ohos.font'; import mediaQuery from './@ohos.mediaquery'; import type inspector from './@ohos.arkui.inspector'; -import type observer from './@ohos.arkui.observer'; import promptAction, { LevelOrder } from './@ohos.promptAction'; import router from './@ohos.router'; import type componentUtils from './@ohos.arkui.componentUtils'; +/*** if arkts 1.1 */ import { ComponentContent, FrameNode, Frame } from './@ohos.arkui.node'; import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +import type observer from './@ohos.arkui.observer'; +/*** endif */ import { SimpleAnimatorOptions } from './@ohos.animator'; import type { Callback, AsyncCallback } from './@ohos.base'; import { MeasureOptions } from './@ohos.measure'; @@ -37,6 +39,29 @@ import image from './@ohos.multimedia.image'; import type common from './@ohos.app.ability.common'; import type pointer from './@ohos.multimodalInput.pointer'; +/*** if arkts 1.2 */ +import { ComponentContent, FrameNode, Frame } from '@ohos.arkui.node'; +import type observer from '@ohos.arkui.observer'; +import { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +import { + ClickEvent, ExpectedFrameRateRange, DragItemInfo, AnimateParam, KeyframeAnimateParam, + KeyframeState, SheetOptions, PopupCommonOptions, MenuOptions, KeyEvent, Optional +} from './arkui/component/common'; +import { CustomBuilder } from './arkui/component/builder'; +import { GestureEvent, GestureRecognizer } from './arkui/component/gesture'; +import { ResourceStr, SizeOptions, VoidCallback } from './arkui/component/units'; +import { Nullable, Color, FontStyle, WidthBreakpoint, HeightBreakpoint, PixelRoundMode } from './arkui/component/enums'; +import { TimePickerDialogOptions } from './arkui/component/timePicker'; +import { AlertDialogParamWithConfirm, AlertDialogParamWithButtons, AlertDialogParamWithOptions } from './arkui/component/alertDialog'; +import { ActionSheetOptions } from './arkui/component/actionSheet'; +import { TextPickerDialogOptions } from './arkui/component/textPicker'; +import { LocalStorage } from './arkui/stateManagement/storages/localStorage'; +import { DatePickerDialogOptions } from './arkui/component/datePicker'; +import { TabsController } from './arkui/component/tabs'; +import { Scroller } from './arkui/component/scroll'; +import { KeyProcessingMode } from './arkui/component/focus'; +import { TextMenuOptions } from './arkui/component/textCommon'; +/*** endif */ /** * class Font * @@ -55,9 +80,10 @@ import type pointer from './@ohos.multimodalInput.pointer'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class Font { +export declare class Font { /** * Register a customized font in the FontManager. * @@ -73,7 +99,8 @@ export class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ registerFont(options: font.FontOptions): void; @@ -93,7 +120,8 @@ export class Font { * @returns { Array } A list of font names * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getSystemFontList(): Array; @@ -110,7 +138,8 @@ export class Font { * @returns { font.FontInfo } Returns the font info * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getFontByName(fontName: string): font.FontInfo; } @@ -128,9 +157,10 @@ export class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MediaQuery { +export declare class MediaQuery { /** * Sets the media query criteria and returns the corresponding listening handle * @@ -148,7 +178,8 @@ export class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ matchMediaSync(condition: string): mediaQuery.MediaQueryListener; } @@ -164,9 +195,10 @@ export class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class UIInspector { +export declare class UIInspector { /** * Sets the component after layout or draw criteria and returns the corresponding listening handle * @param { string } id - component id. @@ -182,7 +214,8 @@ export class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ createComponentObserver(id: string): inspector.ComponentObserver; } @@ -208,9 +241,10 @@ export class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class Router { +export declare class Router { /** * Navigates to a specified page in the application. * @@ -242,7 +276,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, callback: AsyncCallback): void; @@ -277,7 +312,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions): Promise; @@ -314,7 +350,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -351,7 +388,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; @@ -384,7 +422,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, callback: AsyncCallback): void; @@ -417,7 +456,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions): Promise; @@ -452,7 +492,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -487,7 +528,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; @@ -514,7 +556,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ back(options?: router.RouterOptions): void; @@ -526,7 +569,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ back(index: number, params?: Object): void; @@ -543,7 +587,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ clear(): void; @@ -562,7 +607,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getLength(): string; @@ -581,7 +627,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getState(): router.RouterState; @@ -593,7 +640,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getStateByIndex(index: number): router.RouterState | undefined; @@ -605,7 +653,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getStateByUrl(url: string): Array; @@ -634,7 +683,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showAlertBeforeBackPage(options: router.EnableAlertOptions): void; @@ -651,7 +701,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ hideAlertBeforeBackPage(): void; @@ -670,7 +721,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getParams(): Object; @@ -703,7 +755,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; @@ -736,7 +789,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions): Promise; @@ -771,7 +825,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -806,7 +861,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; @@ -837,7 +893,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; @@ -865,7 +922,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions): Promise; @@ -895,7 +953,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -928,7 +987,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; } @@ -940,7 +1000,8 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ declare type CustomBuilderWithId = (id: number) => void; @@ -951,7 +1012,8 @@ declare type CustomBuilderWithId = (id: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ export interface TargetInfo { /** @@ -961,7 +1023,8 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ id: string | number; @@ -972,7 +1035,8 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ componentId?: number; } @@ -990,9 +1054,10 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class PromptAction { +export declare class PromptAction { /** * Displays the notification text. * @@ -1018,7 +1083,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showToast(options: promptAction.ShowToastOptions): void; @@ -1035,7 +1101,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openToast(options: promptAction.ShowToastOptions): Promise; @@ -1052,7 +1119,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ closeToast(toastId: number): void; @@ -1099,7 +1167,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback): void; @@ -1131,7 +1200,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showDialog(options: promptAction.ShowDialogOptions): Promise; @@ -1168,7 +1238,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback): void; @@ -1200,7 +1271,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionMenu(options: promptAction.ActionMenuOptions): Promise; @@ -1219,7 +1291,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ openCustomDialog(dialogContent: ComponentContent, options?: promptAction.BaseDialogOptions): Promise; @@ -1230,7 +1303,7 @@ export class PromptAction { * * @param { ComponentContent } dialogContent - the content of custom dialog. * @param { promptAction.DialogController } controller - Dialog controller. - * @param { promptAction.BaseDialogOptions } options - Options. + * @param { promptAction.BaseDialogOptions } [options] - Options. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1241,7 +1314,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openCustomDialogWithController(dialogContent: ComponentContent, controller: promptAction.DialogController, options?: promptAction.BaseDialogOptions): Promise; @@ -1262,7 +1336,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ updateCustomDialog(dialogContent: ComponentContent, options: promptAction.BaseDialogOptions): Promise; @@ -1299,7 +1374,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ openCustomDialog(options: promptAction.CustomDialogOptions): Promise; @@ -1309,8 +1385,8 @@ export class PromptAction { * isModal = true and showInSubWindow = true cannot be used at the same time. * * @param { CustomBuilder | CustomBuilderWithId } builder - Dialog builder. - * @param { promptAction.DialogController } controller - Dialog controller. - * @param { promptAction.DialogOptions } options - Options. + * @param { promptAction.DialogController } [controller] - Dialog controller. + * @param { promptAction.DialogOptions } [options] - Options. * @returns { Promise } return the dialog id that will be used by closeCustomDialog. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1320,7 +1396,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ presentCustomDialog(builder: CustomBuilder | CustomBuilderWithId, controller?: promptAction.DialogController, options?: promptAction.DialogOptions): Promise; @@ -1337,7 +1414,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ closeCustomDialog(dialogId: number): void; @@ -1348,7 +1426,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getTopOrder(): LevelOrder; @@ -1359,7 +1438,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getBottomOrder(): LevelOrder; @@ -1368,7 +1448,7 @@ export class PromptAction { * * @param { ComponentContent } content - The content of popup. * @param { TargetInfo } target - The target of popup. - * @param { PopupCommonOptions } options - Options. + * @param { PopupCommonOptions } [options] - Options. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1381,7 +1461,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openPopup(content: ComponentContent, target: TargetInfo, options?: PopupCommonOptions): Promise; @@ -1390,7 +1471,7 @@ export class PromptAction { * * @param { ComponentContent } content - The content of popup. * @param { PopupCommonOptions } options - Options. - * @param { boolean } partialUpdate - If true, only the specified properties in the options are updated, + * @param { boolean } [partialUpdate] - If true, only the specified properties in the options are updated, * otherwise the rest of the properties are overwritten with the default values. * Default value is false. * @returns { Promise } the promise returned by the function. @@ -1403,7 +1484,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ updatePopup(content: ComponentContent, options: PopupCommonOptions, partialUpdate?: boolean): Promise; @@ -1421,7 +1503,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ closePopup(content: ComponentContent): Promise; @@ -1430,7 +1513,7 @@ export class PromptAction { * * @param { ComponentContent } content - The content of menu. * @param { TargetInfo } target - The target of menu. - * @param { MenuOptions } options - Options. + * @param { MenuOptions } [options] - Options. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1443,7 +1526,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ openMenu(content: ComponentContent, target: TargetInfo, options?: MenuOptions): Promise; @@ -1452,7 +1536,7 @@ export class PromptAction { * * @param { ComponentContent } content - The content of menu. * @param { MenuOptions } options - Options. - * @param { boolean } partialUpdate - If true, only the specified properties in the MenuOptions are updated, + * @param { boolean } [partialUpdate] - If true, only the specified properties in the MenuOptions are updated, * otherwise the rest of the properties are overwritten with the default values. * Default value is false. * @returns { Promise } the promise returned by the function. @@ -1465,7 +1549,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ updateMenu(content: ComponentContent, options: MenuOptions, partialUpdate?: boolean): Promise; @@ -1483,7 +1568,8 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ closeMenu(content: ComponentContent): Promise; } @@ -1499,9 +1585,10 @@ export class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; +type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch pan event. @@ -1515,9 +1602,10 @@ declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ -declare type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; +type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch gesture. @@ -1530,9 +1618,10 @@ declare type PanListenerCallback = (event: GestureEvent, current: GestureRecogni * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; +type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; /** * Defines the type can be used for identiting the node, for the string type, it's the inspector id @@ -1545,7 +1634,7 @@ declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNo * @atomicservice * @since 20 */ -declare type NodeIdentity = string | number; +export declare type NodeIdentity = string | number; /** * Defines the callback type used in UIObserver to monitor one specific node's render state. @@ -1553,13 +1642,12 @@ declare type NodeIdentity = string | number; * @typedef { function } NodeRenderStateChangeCallback * @param { NodeRenderState } state - the node's render state * @param { FrameNode } [node] - the information of frameNode - * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ -declare type NodeRenderStateChangeCallback = (state: NodeRenderState, node?: FrameNode) => void; +export declare type NodeRenderStateChangeCallback = (state: NodeRenderState, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver to monitor specific gesture triggered information. @@ -1584,7 +1672,8 @@ export declare type GestureListenerCallback = (info: GestureTriggerInfo) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export interface PageInfo { /** @@ -1593,7 +1682,8 @@ export interface PageInfo { * @type { ?observer.RouterPageInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ routerPageInfo?: observer.RouterPageInfo; @@ -1603,7 +1693,8 @@ export interface PageInfo { * @type { ?observer.NavDestinationInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ navDestinationInfo?: observer.NavDestinationInfo; } @@ -1615,7 +1706,8 @@ export interface PageInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ export interface OverlayManagerOptions { /** @@ -1626,7 +1718,8 @@ export interface OverlayManagerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ renderRootOverlay?: boolean; @@ -1648,6 +1741,7 @@ export interface OverlayManagerOptions { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ enableBackPressedEvent?: boolean; } @@ -1671,7 +1765,16 @@ export interface OverlayManagerOptions { * @atomicservice * @since 12 */ -export class UIObserver { +/** + * Register callbacks to observe ArkUI behavior. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class UIObserver { /** * Subscribes to status changes of this **NavDestination** component. * @@ -1701,6 +1804,24 @@ export class UIObserver { */ on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; + /** + * Registers a callback function to be called when the navigation destination is updated. + * + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback } callback - The callback function to be called when the navigation destination is updated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + on( + type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + callback: Callback + ): void; + /** * Removes a callback function that was previously registered with `on()`. * @@ -1725,6 +1846,25 @@ export class UIObserver { * @since 12 */ off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; + + /** + * Removes a callback function that was previously registered with `on()`. + * + * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. + * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and + * navigation ID will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + off( + type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + callback?: Callback + ): void; /** * Subscribes to status changes of this **NavDestination** component. @@ -1749,7 +1889,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'navDestinationUpdate', callback: Callback): void; @@ -1772,7 +1913,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'navDestinationUpdate', callback?: Callback): void; @@ -1812,7 +1954,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback): void; @@ -1826,7 +1969,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback): void; @@ -1838,7 +1982,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'scrollEvent', callback: Callback): void; @@ -1851,7 +1996,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'scrollEvent', callback?: Callback): void; @@ -1874,7 +2020,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'routerPageUpdate', callback: Callback): void; @@ -1897,7 +2044,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'routerPageUpdate', callback?: Callback): void; @@ -1909,7 +2057,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'densityUpdate', callback: Callback): void; @@ -1922,7 +2071,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'densityUpdate', callback?: Callback): void; @@ -1934,7 +2084,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willDraw', callback: Callback): void; @@ -1947,7 +2098,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willDraw', callback?: Callback): void; @@ -1959,7 +2111,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didLayout', callback: Callback): void; @@ -1972,7 +2125,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didLayout', callback?: Callback): void; @@ -1985,7 +2139,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on( type: 'navDestinationSwitch', @@ -2001,7 +2156,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off( type: 'navDestinationSwitch', @@ -2018,7 +2174,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on( type: 'navDestinationSwitch', @@ -2036,7 +2193,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off( type: 'navDestinationSwitch', @@ -2053,7 +2211,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willClick', callback: ClickEventListenerCallback): void; @@ -2066,7 +2225,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willClick', callback?: ClickEventListenerCallback): void; @@ -2079,7 +2239,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didClick', callback: ClickEventListenerCallback): void; @@ -2092,7 +2253,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didClick', callback?: ClickEventListenerCallback): void; @@ -2105,7 +2267,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'willClick', callback: GestureEventListenerCallback): void; @@ -2118,7 +2281,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'willClick', callback?: GestureEventListenerCallback): void; @@ -2131,7 +2295,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'didClick', callback: GestureEventListenerCallback): void; @@ -2144,7 +2309,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'didClick', callback?: GestureEventListenerCallback): void; @@ -2157,7 +2323,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'beforePanStart', callback: PanListenerCallback): void; @@ -2170,7 +2337,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'beforePanStart', callback?: PanListenerCallback): void; @@ -2183,7 +2351,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'beforePanEnd', callback: PanListenerCallback): void; @@ -2196,7 +2365,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'beforePanEnd', callback?: PanListenerCallback): void; @@ -2209,7 +2379,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'afterPanStart', callback: PanListenerCallback): void; @@ -2222,7 +2393,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'afterPanStart', callback?: PanListenerCallback): void; @@ -2235,7 +2407,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'afterPanEnd', callback: PanListenerCallback): void; @@ -2248,7 +2421,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since arkts { '1.1':'19','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'afterPanEnd', callback?: PanListenerCallback): void; @@ -2262,7 +2436,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback): void; @@ -2276,7 +2451,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback): void; @@ -2289,7 +2465,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'tabContentUpdate', callback: Callback): void; @@ -2302,7 +2479,8 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'tabContentUpdate', callback?: Callback): void; @@ -2394,9 +2572,10 @@ export class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ComponentUtils { +export declare class ComponentUtils { /** * Provide the ability to obtain the coordinates and size of component drawing areas. * @@ -2414,7 +2593,8 @@ export class ComponentUtils { * @throws { BusinessError } 100001 - UI execution context not found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getRectangleById(id: string): componentUtils.ComponentInfo; } @@ -2424,9 +2604,10 @@ export class ComponentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class OverlayManager { +export declare class OverlayManager { /** * Adds a specified ComponentContent node to the OverlayManager. * @@ -2446,7 +2627,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ addComponentContent(content: ComponentContent, index?: number): void; @@ -2464,7 +2646,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ addComponentContentWithOrder(content: ComponentContent, levelOrder?: LevelOrder): void; @@ -2475,7 +2658,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ removeComponentContent(content: ComponentContent): void; @@ -2486,7 +2670,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showComponentContent(content: ComponentContent): void; @@ -2497,7 +2682,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ hideComponentContent(content: ComponentContent): void; @@ -2507,7 +2693,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ showAllComponentContents(): void; @@ -2517,7 +2704,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ hideAllComponentContents(): void; } @@ -2535,7 +2723,8 @@ export class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export interface AtomicServiceBar { /** @@ -2544,7 +2733,8 @@ export interface AtomicServiceBar { * @param { boolean } visible - whether this bar is visible. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ setVisible(visible: boolean): void; @@ -2561,7 +2751,8 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setBackgroundColor(color: Nullable< Color | number | string>): void; @@ -2578,7 +2769,8 @@ export interface AtomicServiceBar { * @param { string } content - the content of the bar. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setTitleContent(content: string): void; @@ -2595,7 +2787,8 @@ export interface AtomicServiceBar { * @param { FontStyle } font - the font style of the bar's title. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setTitleFontStyle(font: FontStyle): void; @@ -2612,7 +2805,8 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setIconColor(color: Nullable< Color | number | string>): void; @@ -2623,7 +2817,8 @@ export interface AtomicServiceBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getBarRect(): Frame; } @@ -2709,16 +2904,18 @@ export interface GestureObserverConfigs { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class DynamicSyncScene { +export declare class DynamicSyncScene { /** * Sets the FrameRateRange of the DynamicSyncScene. * * @param { ExpectedFrameRateRange } range - The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setFrameRateRange(range: ExpectedFrameRateRange): void; @@ -2728,7 +2925,8 @@ export class DynamicSyncScene { * @returns { ExpectedFrameRateRange } The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameRateRange(): ExpectedFrameRateRange; } @@ -2739,16 +2937,18 @@ export class DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class SwiperDynamicSyncScene extends DynamicSyncScene { +export declare class SwiperDynamicSyncScene extends DynamicSyncScene { /** * Type of the SwiperDynamicSyncSceneType. * @type { SwiperDynamicSyncSceneType } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ readonly type: SwiperDynamicSyncSceneType; } @@ -2759,16 +2959,18 @@ export class SwiperDynamicSyncScene extends DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MarqueeDynamicSyncScene extends DynamicSyncScene { +export declare class MarqueeDynamicSyncScene extends DynamicSyncScene { /** * Type of the MarqueeDynamicSyncSceneType. * @type { MarqueeDynamicSyncSceneType } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ readonly type: MarqueeDynamicSyncSceneType; } @@ -2789,9 +2991,10 @@ export class MarqueeDynamicSyncScene extends DynamicSyncScene { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ -export class DragController { +export declare class DragController { /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. @@ -2835,7 +3038,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, callback: AsyncCallback): void; @@ -2880,7 +3084,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) : Promise; @@ -2925,7 +3130,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createDragAction(customArray: Array, dragInfo: dragController.DragInfo): dragController.DragAction; @@ -2948,7 +3154,8 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getDragPreview(): dragController.DragPreview; @@ -2964,7 +3171,8 @@ export class DragController { * @param { boolean } enable - Indicating enable drag event strict reporting or not. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setDragEventStrictReportingEnabled(enable: boolean): void; @@ -2973,7 +3181,8 @@ export class DragController { * @param { dragController.DragStartRequestStatus } requestStatus - Status about the drag start behavior. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void; @@ -2985,7 +3194,8 @@ export class DragController { * @throws { BusinessError } 190004 - Operation failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ cancelDataLoading(key: string): void; @@ -3023,9 +3233,10 @@ export class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class MeasureUtils { +export declare class MeasureUtils { /** * Obtains the width of the specified text in a single line layout. * @@ -3034,7 +3245,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ measureText(options: MeasureOptions): number; @@ -3046,7 +3258,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ measureTextSize(options: MeasureOptions): SizeOptions; @@ -3066,14 +3279,16 @@ export class MeasureUtils { * class FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ - export class FocusController { +export declare class FocusController { /** * clear focus to the root container. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ clearFocus(): void; @@ -3085,7 +3300,8 @@ export class MeasureUtils { * @throws { BusinessError } 150003 - the component is not on tree or does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ requestFocus(key: string): void; @@ -3096,7 +3312,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ activate(isActive: boolean, autoInactive?: boolean): void; @@ -3116,7 +3333,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ setAutoFocusTransfer(isAutoFocusTransfer: boolean): void; @@ -3126,7 +3344,8 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ setKeyProcessingMode(mode: KeyProcessingMode): void; } @@ -3137,7 +3356,8 @@ export class MeasureUtils { * @typedef {pointer.PointerStyle} PointerStyle * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export type PointerStyle = pointer.PointerStyle; @@ -3147,16 +3367,18 @@ export type PointerStyle = pointer.PointerStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class CursorController { +export declare class CursorController { /** * Restore default cursor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ restoreDefault(): void; /** @@ -3166,7 +3388,8 @@ export class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setCursor(value: PointerStyle): void; } @@ -3177,16 +3400,18 @@ export class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ContextMenuController { +export declare class ContextMenuController { /** * Close context menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ close(): void; } @@ -3199,7 +3424,16 @@ export class ContextMenuController { * @atomicservice * @since 12 */ -export abstract class FrameCallback { +/** + * Class FrameCallback + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare abstract class FrameCallback { /** * Call when a new display frame is being rendered. * @@ -3208,7 +3442,8 @@ export abstract class FrameCallback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ onFrame(frameTimeInNano: number): void; @@ -3220,7 +3455,8 @@ export abstract class FrameCallback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ onIdle(timeLeftInNano: number): void; } @@ -3234,7 +3470,8 @@ export abstract class FrameCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export type Context = common.Context; @@ -3242,9 +3479,10 @@ export type Context = common.Context; * class ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ -export class ComponentSnapshot { +export declare class ComponentSnapshot { /** * Get a component snapshot by component id. * @@ -3259,7 +3497,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ get(id: string, callback: AsyncCallback, options?: componentSnapshot.SnapshotOptions): void; @@ -3277,7 +3516,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ get(id: string, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3299,7 +3539,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void; @@ -3322,7 +3563,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3344,7 +3586,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3362,7 +3605,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3383,7 +3627,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3405,7 +3650,8 @@ export class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createFromComponent(content: ComponentContent, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3446,7 +3692,16 @@ export class ComponentSnapshot { * @atomicservice * @since 11 */ -export class UIContext { +/** + * class UIContext + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ +export declare class UIContext { /** * Checks whether the UiContext object ia available. * @@ -3473,7 +3728,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getFont(): Font; @@ -3492,7 +3748,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getMediaQuery(): MediaQuery; @@ -3509,7 +3766,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getUIInspector(): UIInspector; @@ -3524,7 +3782,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFilteredInspectorTree(filters?: Array): string; @@ -3541,7 +3800,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFilteredInspectorTreeById(id: string, depth: number, filters?: Array): string; @@ -3560,7 +3820,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getRouter(): Router; @@ -3579,7 +3840,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getPromptAction(): PromptAction; @@ -3596,7 +3858,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getComponentUtils(): ComponentUtils; @@ -3615,7 +3878,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getUIObserver(): UIObserver; @@ -3626,7 +3890,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getOverlayManager(): OverlayManager; @@ -3638,7 +3903,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ setOverlayManagerOptions(options: OverlayManagerOptions): boolean; @@ -3649,7 +3915,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ getOverlayManagerOptions(): OverlayManagerOptions; @@ -3678,7 +3945,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ createAnimator(options: AnimatorOptions): AnimatorResult; @@ -3694,7 +3962,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ createAnimator(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; @@ -3715,7 +3984,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ animateTo(value: AnimateParam, event: () => void): void; @@ -3735,7 +4005,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void; @@ -3754,7 +4025,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showActionSheet(value: ActionSheetOptions): void; @@ -3773,7 +4045,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showDatePickerDialog(options: DatePickerDialogOptions): void; @@ -3792,7 +4065,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showTimePickerDialog(options: TimePickerDialogOptions): void; @@ -3811,10 +4085,22 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ showTextPickerDialog(options: TextPickerDialogOptions): void; + /** + * textPickerDialog display. + * + * @param { TextPickerDialogOptions | TextPickerDialogOptionsExt } style - Dialog style. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + showTextPickerDialog(style: TextPickerDialogOptions | TextPickerDialogOptionsExt): void; + /** * Run custom functions inside the UIContext scope. * @@ -3830,19 +4116,21 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ runScopedTask(callback: () => void): void; /** - * Sets the avoidance mode for the virtual keyboard.
+ * Sets the avoidance mode for the virtual keyboard. * Default mode: **KeyboardAvoidMode.OFFSET**. * * @param { KeyboardAvoidMode } value - The mode of keyboard avoid. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ setKeyboardAvoidMode(value: KeyboardAvoidMode): void; @@ -3852,7 +4140,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getKeyboardAvoidMode(): KeyboardAvoidMode; @@ -3863,7 +4152,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ setPixelRoundMode(mode: PixelRoundMode): void; @@ -3874,7 +4164,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getPixelRoundMode(): PixelRoundMode; @@ -3882,11 +4173,13 @@ export class UIContext { * Dispach keyboard event to the frameNode with inspector key. * * @param { number | string } node - The uniqueId or inspector key of the target FrameNode. + * @param { KeyEvent } event - The key event to be sent. * @returns { boolean } Returns whether the key event is consumed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts { '1.1':'15','1.2':'20' } + * @arkts 1.1&1.2 */ dispatchKeyEvent(node: number | string, event: KeyEvent): boolean; @@ -3896,7 +4189,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ getAtomicServiceBar(): Nullable; @@ -3919,7 +4213,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ getDragController(): DragController; @@ -3929,7 +4224,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getMeasureUtils(): MeasureUtils; @@ -3950,7 +4246,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array): void; @@ -3959,7 +4256,8 @@ export class UIContext { * @returns { FocusController } the FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFocusController(): FocusController; @@ -3971,7 +4269,8 @@ export class UIContext { * and the system will automatically insert transition animations for state changes caused by the closure function. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ animateToImmediately(param: AnimateParam, event: Callback): void; @@ -3983,7 +4282,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameNodeById(id: string): FrameNode | null; @@ -3995,7 +4295,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getAttachedFrameNodeById(id: string): FrameNode | null; @@ -4014,7 +4315,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getFrameNodeByUniqueId(id: number): FrameNode | null; @@ -4028,7 +4330,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getPageInfoByUniqueId(id: number): PageInfo; @@ -4041,7 +4344,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined; @@ -4053,7 +4357,8 @@ export class UIContext { * set values less than 0 to 0 and values greater than 1 to 1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ setDynamicDimming(id: string, value: number): void; @@ -4064,7 +4369,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getCursorController(): CursorController; @@ -4075,7 +4381,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getContextMenuController(): ContextMenuController; @@ -4084,7 +4391,8 @@ export class UIContext { * @returns { ComponentSnapshot } the ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getComponentSnapshot(): ComponentSnapshot; @@ -4094,7 +4402,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ vp2px(value: number): number; @@ -4104,7 +4413,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2vp(value: number): number; @@ -4114,7 +4424,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ fp2px(value: number): number; @@ -4124,7 +4435,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2fp(value: number): number; @@ -4134,7 +4446,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ lpx2px(value: number): number; @@ -4144,7 +4457,8 @@ export class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ px2lpx(value: number): number; @@ -4156,7 +4470,8 @@ export class UIContext { * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getSharedLocalStorage(): LocalStorage | undefined; @@ -4168,7 +4483,8 @@ export class UIContext { * @stagemodelonly * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getHostContext(): Context | undefined; @@ -4179,7 +4495,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowName(): string | undefined; @@ -4189,7 +4506,8 @@ export class UIContext { * @returns { WidthBreakpoint } The width breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowWidthBreakpoint(): WidthBreakpoint; @@ -4199,7 +4517,8 @@ export class UIContext { * @returns { HeightBreakpoint } The height breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getWindowHeightBreakpoint(): HeightBreakpoint; @@ -4230,7 +4549,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, targetId?: number): Promise; @@ -4252,7 +4572,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise; @@ -4273,7 +4594,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ closeBindSheet(bindSheetContent: ComponentContent): Promise; @@ -4283,7 +4605,8 @@ export class UIContext { * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ postFrameCallback(frameCallback: FrameCallback): void; @@ -4294,7 +4617,8 @@ export class UIContext { * @param { number } delayTime - The delay time in milliseconds, * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; @@ -4305,7 +4629,8 @@ export class UIContext { * @returns { Array} The instance of SwiperDynamicSyncScene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ requireDynamicSyncScene(id: string): Array; @@ -4326,7 +4651,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ clearResourceCache(): void; @@ -4337,7 +4663,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ isFollowingSystemFontScale(): boolean; @@ -4348,7 +4675,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ getMaxFontScale(): number; @@ -4360,7 +4688,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4372,7 +4701,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4385,7 +4715,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4398,7 +4729,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 13 + * @since arkts { '1.1':'13','1.2':'20' } + * @arkts 1.1&1.2 */ unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4408,7 +4740,8 @@ export class UIContext { * @param { Optional } enabled - enable or disable swipe to back event. * @syscap SystemCapability.ArkUI.ArkUI.Circle * @atomicservice - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ enableSwipeBack(enabled: Optional): void; @@ -4420,7 +4753,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ freezeUINode(id: string, isFrozen: boolean): void; @@ -4432,7 +4766,8 @@ export class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts { '1.1':'18','1.2':'20' } + * @arkts 1.1&1.2 */ freezeUINode(uniqueId: number, isFrozen: boolean): void; @@ -4443,7 +4778,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ getTextMenuController(): TextMenuController; @@ -4471,7 +4807,8 @@ export class UIContext { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts { '1.1':'17','1.2':'20' } + * @arkts 1.1&1.2 */ static createUIContextWithoutWindow(context: common.UIAbilityContext | common.ExtensionContext) : UIContext | undefined; @@ -4481,9 +4818,28 @@ export class UIContext { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 17 + * @since arkts { '1.1':'17','1.2':'20' } + * @arkts 1.1&1.2 */ static destroyUIContextWithoutWindow(): void; + + /** + * Set the upper limit for the cache count of HSP resource management objects. + *

**NOTE**: + *
If the upper limit of the cache is set too high, there is a risk of excessive memory overhead. + * It is recommended to configure it according to actual needs. + *

+ * + * @param { number } count - The cache limit of resource manager for HSP, must be non-negative integers. + * @throws { BusinessError } 100101 - The parameter value cannot be less than 0. + * @throws { BusinessError } 100102 - The parameter value cannot be a floating-point number. + * @throws { BusinessError } 100103 - The function cannot be called from a non-main thread. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 21 + */ + static setResourceManagerCacheMaxCountForHSP(count: number): void; } /** @@ -4493,7 +4849,8 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum KeyboardAvoidMode { @@ -4502,7 +4859,8 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ OFFSET = 0, @@ -4511,7 +4869,8 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts { '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ RESIZE = 1, @@ -4520,7 +4879,8 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ OFFSET_WITH_CARET = 2, @@ -4529,7 +4889,8 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ RESIZE_WITH_CARET = 3, @@ -4538,7 +4899,8 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ NONE = 4, } @@ -4549,7 +4911,8 @@ export const enum KeyboardAvoidMode { * @enum { number } SwiperDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum SwiperDynamicSyncSceneType { /** @@ -4557,7 +4920,8 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ GESTURE = 0, @@ -4566,7 +4930,8 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ ANIMATION = 1 } @@ -4577,7 +4942,8 @@ export const enum SwiperDynamicSyncSceneType { * @enum { number } MarqueeDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ export const enum MarqueeDynamicSyncSceneType { /** @@ -4585,7 +4951,8 @@ export const enum MarqueeDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 14 + * @since arkts { '1.1':'14','1.2':'20' } + * @arkts 1.1&1.2 */ ANIMATION = 1 } @@ -4596,9 +4963,10 @@ export const enum MarqueeDynamicSyncSceneType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ -export class TextMenuController { +export declare class TextMenuController { /** * Set text menu options. * @@ -4606,7 +4974,8 @@ export class TextMenuController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 16 + * @since arkts { '1.1':'16','1.2':'20' } + * @arkts 1.1&1.2 */ setMenuOptions(options: TextMenuOptions): void; @@ -4773,4 +5142,4 @@ export const enum GestureActionPhase { * @since 20 */ ROTATION = 5 -} \ No newline at end of file +} diff --git a/api/@ohos.arkui.advanced.ChipGroup.d.ets b/api/@ohos.arkui.advanced.ChipGroup.d.ets index 1242e40f7ab976df799aa0b5a870eef8a043d748..bc833d450a26fa434c2aed87a31e6a63678bf675 100644 --- a/api/@ohos.arkui.advanced.ChipGroup.d.ets +++ b/api/@ohos.arkui.advanced.ChipGroup.d.ets @@ -668,7 +668,7 @@ export declare struct ChipGroup { chipGroupPadding?: ChipGroupPaddingOptions; /** - * Chip group callback. + * Chip group callback. when chip status is changed, this onChange is called. * * @type { ?Callback> } * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets index 1818bd2488a5b89857ff28c9b30be2550642a784..87594d6cf9f7006323c91b10ff7475297893b575 100644 --- a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets @@ -32,6 +32,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum GridObjectSortComponentType { /** @@ -79,6 +80,7 @@ export declare enum GridObjectSortComponentType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface GridObjectSortComponentItem { /** @@ -190,6 +192,7 @@ export interface GridObjectSortComponentItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface GridObjectSortComponentOptions { /** @@ -311,6 +314,7 @@ export interface GridObjectSortComponentOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct GridObjectSortComponent { diff --git a/api/@ohos.arkui.advanced.MultiNavigation.d.ets b/api/@ohos.arkui.advanced.MultiNavigation.d.ets index a90ca599fcb99a4aa3fa4131fccf43c179892f3d..361ca5f18352c89a855aa84c9a1801aaf60ba856 100644 --- a/api/@ohos.arkui.advanced.MultiNavigation.d.ets +++ b/api/@ohos.arkui.advanced.MultiNavigation.d.ets @@ -144,6 +144,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently * pushed in stack. Default splitPolicy is DETAIL_PAGE. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -173,6 +175,8 @@ export declare class MultiNavPathStack extends NavPathStack { * @param { string } name - Indicates the name of the NavDestination to be pushed. * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently * pushed in stack. Default splitPolicy is DETAIL_PAGE. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -189,6 +193,8 @@ export declare class MultiNavPathStack extends NavPathStack { * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. * @param { base.Callback } [onPop] - The callback when next page returns. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently * pushed in stack. Default splitPolicy is DETAIL_PAGE. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -205,6 +211,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -232,6 +240,8 @@ export declare class MultiNavPathStack extends NavPathStack { * @param { string } name - Indicates name of the new NavDestination in top of stack. * @param { Object } param - Indicates the detailed parameter of the new NavDestination in top of the stack. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -267,6 +277,8 @@ export declare class MultiNavPathStack extends NavPathStack { * Pop the top NavDestination of the stack. * * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, * otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -282,6 +294,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { Object } [result] - Page Customization processing results. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, * otherwise returns undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -297,6 +311,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { string } name - Name of the NavDestination. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -312,6 +328,8 @@ export declare class MultiNavPathStack extends NavPathStack { * @param { string } name - Name of the NavDestination. * @param { Object } result - Page Customization processing results. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -325,6 +343,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { number } index - The index of NavDestination page. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -338,6 +358,8 @@ export declare class MultiNavPathStack extends NavPathStack { * @param { number } index - The index of NavDestination page. * @param { Object } result - Page Customization processing results. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -351,6 +373,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { string } name - Indicates the name of the NavDestination to be moved to the top. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @returns { number } Returns the index of the NavDestination if it exists in the stack, otherwise returns -1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -364,6 +388,8 @@ export declare class MultiNavPathStack extends NavPathStack { * * @param { number } index - Indicates the index of the NavDestination to be moved to the top. * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -376,6 +402,8 @@ export declare class MultiNavPathStack extends NavPathStack { * stack will be retained. * * @param { boolean } [animated] - Indicates whether the transition is animated. + *
Default value: **true**. + *
**true**: The transition animation is supported. **false**: The transition animation is not supported. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice diff --git a/api/@ohos.arkui.advanced.SegmentButton.d.ets b/api/@ohos.arkui.advanced.SegmentButton.d.ets index 1112cd8a2ca7838fe79bf4d9fbfb36dd1eb72de5..f3119b485fdb783846b8f3712c71a3b578df9488 100644 --- a/api/@ohos.arkui.advanced.SegmentButton.d.ets +++ b/api/@ohos.arkui.advanced.SegmentButton.d.ets @@ -333,23 +333,25 @@ declare type DimensionNoPercentage = PX | VP | FP | LPX | Resource; /** * Defines the BorderRadiusMode type. - * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ declare enum BorderRadiusMode { - /** + /** * Default mode, radius is auto calculated by framework. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ DEFAULT = 0, - /** + /** * Custom mode, radius can be set by developers. + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 diff --git a/api/@ohos.arkui.advanced.SplitLayout.d.ets b/api/@ohos.arkui.advanced.SplitLayout.d.ets index d32452e04f1a4e76c7ecb069c1367d88ace1d116..5e098af0ba60b0daa687ed924aec94357332d1de 100644 --- a/api/@ohos.arkui.advanced.SplitLayout.d.ets +++ b/api/@ohos.arkui.advanced.SplitLayout.d.ets @@ -32,6 +32,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct SplitLayout { @@ -48,7 +49,7 @@ export declare struct SplitLayout { * @atomicservice * @since 11 */ - @BuilderParam container: () => void; + @BuilderParam container: () => void; /** * Image in the layout. diff --git a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets index e17f55838bdf44e65c784e059072faefd76bcc29..0774f50ac3049657683103829de633c1f85df81a 100644 --- a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets +++ b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets @@ -35,6 +35,7 @@ * @crossplatform * @atomicservice * @since 20 + * @noninterop */ @Component export declare struct SwipeRefresher { diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index 90c190a547e8d64091b20e8c36ae82a17293bcfa..a10e0f398be550d92b443f64b9e189939e5cecf8 100644 --- a/api/@ohos.arkui.component.d.ets +++ b/api/@ohos.arkui.component.d.ets @@ -12,42 +12,144 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit ArkUI * @arkts 1.2 */ + export * from './arkui/UserView'; +export * from './arkui/component/animation'; +export * from './arkui/component/customComponent'; +export * from './arkui/component/common'; +export * from './arkui/component/column'; export * from './arkui/component/text'; +export * from './arkui/component/styledString'; export * from './arkui/component/enums'; export * from './arkui/component/units'; +export * from './arkui/component/actionSheet'; +export * from './arkui/component/alertDialog'; +export * from './arkui/component/alphabetIndexer'; +export * from './arkui/component/animator'; +export * from './arkui/component/badge'; export * from './arkui/component/blank'; +export * from './arkui/component/builder'; export * from './arkui/component/button'; +export * from './arkui/component/calendarPicker'; +export * from './arkui/component/canvas'; +export * from './arkui/component/checkbox'; +export * from './arkui/component/checkboxgroup'; +export * from './arkui/component/circle'; export * from './arkui/component/column'; -export * from './arkui/component/row'; +export * from './arkui/component/columnSplit'; export * from './arkui/component/common'; +export * from './arkui/component/containerSpan'; +export * from './arkui/component/contentSlot'; +export * from './arkui/component/counter'; export * from './arkui/component/customComponent'; +export * from './arkui/component/customDialogController'; +export * from './arkui/component/dataPanel'; +export * from './arkui/component/datePicker'; +export * from './arkui/component/divider'; +export * from './arkui/component/effectComponent'; +export * from './arkui/component/ellipse'; +export * from './arkui/component/embeddedComponent'; export * from './arkui/component/enums'; +export * from './arkui/component/extendableComponent'; +export * from './arkui/component/flex'; +export * from './arkui/component/flowItem'; +export * from './arkui/component/focus'; +export * from './arkui/component/folderStack'; export * from './arkui/component/forEach'; +export * from './arkui/component/formComponent'; +export * from './arkui/component/formLink'; +export * from './arkui/component/gauge'; export * from './arkui/component/gesture'; export * from './arkui/component/grid'; -export * from './arkui/component/griditem'; +export * from './arkui/component/gridCol'; +export * from './arkui/component/gridRow'; +export * from './arkui/component/gridItem'; +export * from './arkui/component/hyperlink'; export * from './arkui/component/image'; +export * from './arkui/component/imageAnimator'; export * from './arkui/component/imageCommon'; +export * from './arkui/component/imageSpan'; +export * from './arkui/component/indicatorcomponent'; +export * from './arkui/component/inspector'; export * from './arkui/component/lazyForEach'; +export * from './arkui/component/line'; export * from './arkui/component/list'; +export * from './arkui/component/listItem'; +export * from './arkui/component/listItemGroup'; +export * from './arkui/component/loadingProgress'; +export * from './arkui/component/marquee'; +export * from './arkui/component/matrix2d'; export * from './arkui/component/mediaCachedImage'; +export * from './arkui/component/menu'; +export * from './arkui/component/menuItem'; +export * from './arkui/component/menuItemGroup'; +export * from './arkui/component/navDestination'; export * from './arkui/component/navigation'; +export * from './arkui/component/nodeContainer'; +export * from './arkui/component/particle'; +export * from './arkui/component/pasteButton'; +export * from './arkui/component/path'; +export * from './arkui/component/patternLock'; +export * from './arkui/component/pluginComponent'; +export * from './arkui/component/polygon'; +export * from './arkui/component/polyline'; export * from './arkui/component/progress'; +export * from './arkui/component/qrcode'; +export * from './arkui/component/radio'; +export * from './arkui/component/rating'; +export * from './arkui/component/rect'; +export * from './arkui/component/refresh'; +export * from './arkui/component/relativeContainer'; +export * from './arkui/component/remoteWindow'; +export * from './arkui/component/repeat'; +export * from './arkui/component/richEditor'; +export * from './arkui/component/richText'; +export * from './arkui/component/rootScene'; +export * from './arkui/component/row'; +export * from './arkui/component/rowSplit'; +export * from './arkui/component/screen'; export * from './arkui/component/scroll'; export * from './arkui/component/scrollBar'; +export * from './arkui/component/search'; +export * from './arkui/component/securityComponent'; +export * from './arkui/component/select'; +export * from './arkui/component/shape'; +export * from './arkui/component/sidebar'; +export * from './arkui/component/slider'; +export * from './arkui/component/span'; export * from './arkui/component/stack'; +export * from './arkui/component/stateManagement'; +export * from './arkui/component/stepper'; +export * from './arkui/component/stepperItem'; +export * from './arkui/component/styledString'; +export * from './arkui/component/swiper'; +export * from './arkui/component/symbolSpan'; export * from './arkui/component/symbolglyph'; +export * from './arkui/component/tabContent'; +export * from './arkui/component/tabs'; +export * from './arkui/component/text'; +export * from './arkui/component/textArea'; +export * from './arkui/component/textClock'; +export * from './arkui/component/textCommon'; +export * from './arkui/component/textInput'; +export * from './arkui/component/textPicker'; +export * from './arkui/component/textTimer'; +export * from './arkui/component/timePicker'; +export * from './arkui/component/toggle'; +export * from './arkui/component/uiExtensionComponent'; export * from './arkui/component/units'; -export * from './arkui/component/resources'; -export * from './arkui/component/locationButton'; -export * from './arkui/component/pasteButton'; -export * from './arkui/component/saveButton'; -export * from './arkui/component/securityComponent'; +export * from './arkui/component/video'; +export * from './arkui/component/waterFlow'; export * from './arkui/component/web'; -export * from './arkui/component/textCommon'; \ No newline at end of file +export * from './arkui/component/windowScene'; +export * from './arkui/component/withTheme'; +export * from './arkui/component/xcomponent'; +export * from './arkui/component/resources'; +export * from './arkui/component/lazyGridLayout'; +export * from './arkui/component/pageTransition'; \ No newline at end of file diff --git a/api/@ohos.arkui.componentSnapshot.d.ets b/api/@ohos.arkui.componentSnapshot.d.ets deleted file mode 100644 index 06c5a5a98eb69e94ee7da0ed998d70980817d403..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.componentSnapshot.d.ets +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AsyncCallback } from './@ohos.base'; -import image from './@ohos.multimedia.image'; -import { CustomBuilder } from './arkui/component/common'; - -/** - * This module allows developers to export snapshot image from a component or a custom builder. - * - * @namespace componentSnapshot - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * This module allows developers to export snapshot image from a component or a custom builder. - * - * @namespace componentSnapshot - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare namespace componentSnapshot { - /** - * Defines the extra options for snapshot taking. - * - * @typedef SnapshotOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface SnapshotOptions { - /** - * Defines the scale property to render the snapshot. - * - * @type {?number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - scale?: number - - /** - * Whether to wait the rendering is finished. - * - * @type {?boolean} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - waitUntilRenderFinished?: boolean - } - - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function get(id: string, callback: AsyncCallback, options?: SnapshotOptions): void; - - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Take a snapshot of the target component. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function get(id: string, options?: SnapshotOptions): Promise; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { AsyncCallback } callback - Callback that contains the snapshot in PixelMap format. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, - delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; - - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Generate a snapshot from a custom component builder. - * - * @param { CustomBuilder } builder - Builder function of a custom component. - * @param { number } [delay] - Defines the delay time to render the snapshot. - * @param { boolean } [checkImageStatus] - Defines if check the image decoding status before taking snapshot. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { Promise } A Promise with the snapshot in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The builder is not a valid build function. - * @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for - * the ready state is required when the checkImageStatus option is enabled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function createFromBuilder(builder: CustomBuilder, delay?: number, - checkImageStatus?: boolean, options?: SnapshotOptions): Promise; - - /** - * Take a screenshot of the specified component in synchronous mode, - * this mode will block the main thread, please use it with caution, the maximum - * waiting time of the interface is 3s, if it does not return after 3s, an exception will be thrown. - * - * @param { string } id - Target component ID, set by developer through .id attribute. - * @param { SnapshotOptions } [options] - Define the snapshot options. - * @returns { image.PixelMap } The snapshot result in PixelMap format. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Invalid ID. - * @throws { BusinessError } 160002 - Timeout. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; -} -export default componentSnapshot; \ No newline at end of file diff --git a/api/@ohos.arkui.componentSnapshot.d.ts b/api/@ohos.arkui.componentSnapshot.d.ts index bbb183f6ddf63287b1a01f0ff4dae8d7a7adb909..9d76a24829f7ec7508377272affc3e7df6480d2e 100644 --- a/api/@ohos.arkui.componentSnapshot.d.ts +++ b/api/@ohos.arkui.componentSnapshot.d.ts @@ -18,8 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CustomBuilder } from './arkui/component/builder'; +/*** endif */ + import { AsyncCallback } from './@ohos.base'; -import image from './@ohos.multimedia.image' +import image from './@ohos.multimedia.image'; /** * This module allows developers to export snapshot image from a component or a custom builder. @@ -36,7 +40,8 @@ import image from './@ohos.multimedia.image' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace componentSnapshot { /** @@ -46,9 +51,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - interface SnapshotRegion { + export interface SnapshotRegion { /** * Left side position of rectangle, in PX. * @@ -56,7 +62,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ left: number; @@ -67,7 +74,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ right: number; @@ -78,7 +86,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -89,7 +98,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: number; } @@ -102,9 +112,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - interface LocalizedSnapshotRegion { + export interface LocalizedSnapshotRegion { /** * Left/Right side position of rectangle, in PX * @@ -112,7 +123,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ start: number; @@ -123,7 +135,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ end: number; @@ -134,7 +147,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ top: number; @@ -145,7 +159,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ bottom: number; } @@ -157,9 +172,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; + export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; /** * Defines the extra options for snapshot taking. @@ -168,9 +184,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface SnapshotOptions { + export interface SnapshotOptions { /** * Defines the scale property to render the snapshot. * @@ -178,7 +195,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale?: number @@ -189,7 +207,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ waitUntilRenderFinished?: boolean @@ -200,7 +219,8 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ region?: SnapshotRegionType } @@ -233,9 +253,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get + * @arkts 1.1&1.2 */ function get(id: string, callback: AsyncCallback, options?: SnapshotOptions): void; @@ -267,9 +288,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get + * @arkts 1.1&1.2 */ function get(id: string, options?: SnapshotOptions): Promise; @@ -305,9 +327,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder + * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; @@ -344,9 +367,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder + * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): Promise; @@ -368,9 +392,10 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function getSync(id: string, options?: SnapshotOptions): image.PixelMap; + export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; } export default componentSnapshot; diff --git a/api/@ohos.arkui.componentUtils.d.ets b/api/@ohos.arkui.componentUtils.d.ets deleted file mode 100644 index ff1d5120eab0f124b98325cf5e7bc0ab52d94372..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.componentUtils.d.ets +++ /dev/null @@ -1,847 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -/** - * This module provides functionality for component coordinates and sizes. - * @namespace componentUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * This module provides functionality for component coordinates and sizes. - * @namespace componentUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * This module provides functionality for component coordinates and sizes. - * @namespace componentUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare namespace componentUtils { - - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Component information. - * @typedef ComponentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface ComponentInfo { - - /** - * component size. - * @type {Size} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * component size. - * @type {Size} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * component size. - * @type {Size} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - size: Size - - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the local. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - localOffset: Offset - - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the window. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - windowOffset: Offset - - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information relative to the screen. - * @type {Offset} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - screenOffset: Offset - - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for translation. - * @type {TranslateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - translate: TranslateResult - - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for scale. - * @type {ScaleResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - scale: ScaleResult - - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information for rotate. - * @type {RotateResult} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - rotate: RotateResult - - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Obtain attribute information of the transformation matrix. - * @type {Matrix4Result} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - transform: Matrix4Result - } - - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the size property. - * @typedef Size - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface Size { - - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the width property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - width: number - - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the height property. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - height: number - } - - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Defines the offset property. - * @typedef Offset - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface Offset { - - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Coordinate x of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - x: number - - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Coordinate y of the Position. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - y: number - } - - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Translation Result - * @typedef TranslateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface TranslateResult { - - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the x-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - x: number - - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the y-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - y: number - - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Indicates the translation distance of the z-axis, in vp. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - z: number - } - - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Scale Result - * @typedef ScaleResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface ScaleResult { - - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Zoom factor of the x-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - x: number - - /** - * Zoom factor of the y-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Zoom factor of the y-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Zoom factor of the y-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - y: number - - /** - * Zoom factor of the z-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Zoom factor of the z-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Zoom factor of the z-axis. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - z: number - - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - centerX: number - - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - centerY: number - } - - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Rotation Result. - * @typedef RotateResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface RotateResult { - - /** - * Axis of rotation vector x coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Axis of rotation vector x coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Axis of rotation vector x coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - x: number - - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Axis of rotation vector y coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - y: number - - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Axis of rotation vector z coordinate. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - z: number - - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the x-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - centerX: number - - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Transform the y-axis coordinate of the center point. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - centerY: number - - /** - * Rotation angle. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Rotation angle. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Rotation angle. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - angle: number - } - - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The matrix is column-first fourth-order matrix. - * @typedef { [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] } Matrix4Result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export type Matrix4Result = [ - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - number, - ]; - - /** - * Provide the ability to obtain the coordinates and size of component drawing areas. - * @param {string} id - component id. - * @returns {ComponentInfo} the object of ComponentInfo. - * @throws { BusinessError } 100001 - UI execution context not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provide the ability to obtain the coordinates and size of component drawing areas. - * @param {string} id - component id. - * @returns {ComponentInfo} the object of ComponentInfo. - * @throws { BusinessError } 100001 - UI execution context not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - export function getRectangleById(id: string): ComponentInfo; -} -export default componentUtils; \ No newline at end of file diff --git a/api/@ohos.arkui.componentUtils.d.ts b/api/@ohos.arkui.componentUtils.d.ts index 32658420dca159b505dcfb4717f7f95fb6b865ed..5f2b6268df7841b1c25d4b4b01f67dd361d7d6b0 100644 --- a/api/@ohos.arkui.componentUtils.d.ts +++ b/api/@ohos.arkui.componentUtils.d.ts @@ -37,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace componentUtils { @@ -60,9 +61,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ComponentInfo { + export interface ComponentInfo { /** * component size. @@ -83,7 +85,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size @@ -106,7 +109,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ localOffset: Offset @@ -129,7 +133,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ windowOffset: Offset @@ -152,7 +157,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ screenOffset: Offset @@ -175,7 +181,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ translate: TranslateResult @@ -198,7 +205,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scale: ScaleResult @@ -221,7 +229,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rotate: RotateResult @@ -244,7 +253,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transform: Matrix4Result } @@ -268,9 +278,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface Size { + export interface Size { /** * Defines the width property. @@ -291,7 +302,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number @@ -314,7 +326,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number } @@ -338,9 +351,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface Offset { + export interface Offset { /** * Coordinate x of the Position. @@ -361,7 +375,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -384,7 +399,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number } @@ -408,9 +424,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface TranslateResult { + export interface TranslateResult { /** * Indicates the translation distance of the x-axis, in vp. @@ -431,7 +448,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -454,7 +472,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -477,7 +496,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number } @@ -501,9 +521,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ScaleResult { + export interface ScaleResult { /** * Zoom factor of the x-axis. @@ -524,7 +545,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -547,7 +569,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -570,7 +593,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number @@ -593,7 +617,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerX: number @@ -616,7 +641,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerY: number } @@ -640,9 +666,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interface RotateResult { + export interface RotateResult { /** * Axis of rotation vector x coordinate. @@ -663,7 +690,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number @@ -686,7 +714,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number @@ -709,7 +738,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ z: number @@ -732,7 +762,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerX: number @@ -755,7 +786,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ centerY: number @@ -778,7 +810,8 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ angle: number } @@ -802,9 +835,10 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type Matrix4Result = [ + export type Matrix4Result = [ number, number, number, diff --git a/api/@ohos.arkui.dragController.d.ets b/api/@ohos.arkui.dragController.d.ets deleted file mode 100644 index ebd3435b0f7e9eb6a1aa7269fe5c71fbff2cd259..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.dragController.d.ets +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - - - -import { AsyncCallback, BusinessError, Callback } from './@ohos.base'; -import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; -import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve, CustomBuilder } from './arkui/component/common'; -import { TouchPoint, ResourceColor } from './arkui/component/units'; -import { Curve } from './arkui/component/enums'; - -/** - * This module allows developers to trigger a drag event. - * @namespace dragController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * This module allows developers to trigger a drag event. - * @namespace dragController - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - declare namespace dragController { - /** - * Defines the Drag Status. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Defines the Drag Status. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export const enum DragStatus { - /** - * Drag has started. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag has started. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - STARTED = 0, - /** - * Drag has ended. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag has ended. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - ENDED = 1, - } - - /** - * Drag and drop information - * - * @interface DragAndDropInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag and drop information - * - * @interface DragAndDropInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface DragAndDropInfo { - /** - * The drag status. - * @type { DragStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The drag status. - * @type { DragStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - status: DragStatus; - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - event: DragEvent; - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraParams?: string; - } - - /** - * One drag action object for drag process - * - * @interface DragAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * One drag action object for drag process - * - * @interface DragAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface DragAction { - /** - * trigger drag action - * - * @returns { Promise } A Promise can indicate the start result. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * trigger drag action - * - * @returns { Promise } A Promise can indicate the start result. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - startDrag(): Promise; - /** - * Registers a callback for listening on drag status changes. - * This callback is triggered when the drag status change. - * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Registers a callback for listening on drag status changes. - * This callback is triggered when the drag status change. - * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - on(type: 'statusChange', callback: Callback): void; - - /** - * Deregisters a callback for listening on drag status changes. - * This callback is not triggered when the drag status change. - * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Deregisters a callback for listening on drag status changes. - * This callback is not triggered when the drag status change. - * - * @param { 'statusChange' } type for status changing - * @param { Callback } callback with drag event and status information - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - off(type: 'statusChange', callback?: Callback): void; - } - - /** - * DragInfo object description - * - * @interface DragInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * DragInfo object description - * - * @interface DragInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface DragInfo { - /** - * A unique identifier to identify which touch point. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A unique identifier to identify which touch point. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - pointerId: number; - - /** - * Drag data. - * @type { ?unifiedDataChannel.UnifiedData } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Drag data. - * @type { ?unifiedDataChannel.UnifiedData } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - data?: unifiedDataChannel.UnifiedData; - - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Additional information about the drag info. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraParams?: string; - - /** - * Touch point coordinates. - * @type { ?TouchPoint } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Touch point coordinates. - * @type { ?TouchPoint } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - touchPoint?: TouchPoint; - - /** - * Drag preview options. - * @type { ?DragPreviewOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag preview options. - * @type { ?DragPreviewOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - previewOptions?: DragPreviewOptions; - } - - /** - * Defines the animation options for drag preview. - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Defines the animation options for drag preview. - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface AnimationOptions { - /** - * Animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - duration?: number; - /** - * Animation curve. - * @type { ?(Curve | ICurve) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Animation curve. - * @type { ?(Curve | ICurve) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - curve?: Curve | ICurve; - } - - /** - * Provides the functions of setting color or updating animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Provides the functions of setting color or updating animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export class DragPreview { - /** - * change foreground color of preview - * @param { ResourceColor } color - color value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * change foreground color of preview - * @param { ResourceColor } color - color value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - setForegroundColor(color: ResourceColor): void; - /** - * update preview style with animation - * @param { AnimationOptions } options - animation options - * @param { function } handler - change style functions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * update preview style with animation - * @param { AnimationOptions } options - animation options - * @param { function } handler - change style functions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - animate(options: AnimationOptions, handler: () =>void): void; - } - - /** - * Define the drag event paramters - * - * @interface DragEventParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface DragEventParam { - - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The information containing the drag event. - * @type { DragEvent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - event: DragEvent; - - /** - * Additional information about the drag info. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Additional information about the drag info. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraParams: string; - } - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, - callback: AsyncCallback): void; - - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise; - - /** - * Create one drag action object, which can be used for starting drag later or monitoring - * the drag status after drag started. - * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Create one drag action object, which can be used for starting drag later or monitoring - * the drag status after drag started. - * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. - * @param { DragInfo } dragInfo - Information about the drag event. - * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal handling failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function createDragAction(customArray: Array, dragInfo: DragInfo): DragAction; - - /** - * Get drag preview object. - * @returns { DragPreview } An drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Get drag preview object. - * @returns { DragPreview } An drag preview object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function getDragPreview(): DragPreview; -} -export default dragController; \ No newline at end of file diff --git a/api/@ohos.arkui.dragController.d.ts b/api/@ohos.arkui.dragController.d.ts index 7430d82dc80e7df9e20379c14d5424778e6e0787..66e64fdfd041b32699423121805d1f43729b5480 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -18,6 +18,12 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve } from './arkui/component/common'; +import { CustomBuilder } from './arkui/component/builder'; +import { TouchPoint, ResourceColor } from './arkui/component/units'; +import { Curve } from './arkui/component/enums'; +/*** endif */ import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; @@ -42,7 +48,8 @@ import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace dragController { /** @@ -67,7 +74,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const enum DragStatus { /** @@ -86,7 +94,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ STARTED = 0, /** @@ -105,7 +114,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ENDED = 1, } @@ -132,7 +142,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragAndDropInfo { /** @@ -154,7 +165,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ status: DragStatus; /** @@ -176,7 +188,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ event: DragEvent; /** @@ -198,7 +211,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams?: string; } @@ -225,7 +239,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragAction { /** @@ -253,7 +268,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ startDrag(): Promise; /** @@ -284,7 +300,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'statusChange', callback: Callback): void; @@ -316,7 +333,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'statusChange', callback?: Callback): void; } @@ -343,7 +361,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragInfo { /** @@ -365,7 +384,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ pointerId: number; @@ -388,7 +408,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ data?: unifiedDataChannel.UnifiedData; @@ -411,7 +432,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams?: string; @@ -434,7 +456,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ touchPoint?: TouchPoint; @@ -457,7 +480,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ previewOptions?: DragPreviewOptions; @@ -498,7 +522,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AnimationOptions { /** @@ -520,7 +545,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -542,7 +568,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ curve?: Curve | ICurve; } @@ -563,7 +590,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export class DragPreview { /** @@ -585,7 +613,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setForegroundColor(color: ResourceColor): void; /** @@ -610,7 +639,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ animate(options: AnimationOptions, handler: () =>void): void; } @@ -630,7 +660,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DragEventParam { @@ -653,7 +684,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ event: DragEvent; @@ -676,7 +708,8 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ extraParams: string; } @@ -685,11 +718,12 @@ declare namespace dragController { * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag + * event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -699,44 +733,45 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 - */ + */ /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 - * @deprecated since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag + * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, - callback: AsyncCallback): void; + callback: AsyncCallback): void; /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -746,10 +781,10 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -760,17 +795,18 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag + * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise; @@ -778,13 +814,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 @@ -793,13 +829,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -809,20 +845,21 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#createDragAction + * @arkts 1.1&1.2 */ function createDragAction(customArray: Array, dragInfo: DragInfo): DragAction; @@ -845,9 +882,10 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#getDragPreview + * @arkts 1.1&1.2 */ function getDragPreview(): DragPreview; @@ -857,7 +895,8 @@ declare namespace dragController { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const enum DragStartRequestStatus { /** @@ -866,7 +905,8 @@ declare namespace dragController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WAITING = 0, @@ -876,7 +916,8 @@ declare namespace dragController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1, } @@ -891,7 +932,7 @@ declare namespace dragController { * @atomicservice * @since 20 */ - enum DragSpringLoadingState { + const enum DragSpringLoadingState { /** * The user has remained stationary for a period, initiating the spring loading process. * This state allows for some preparatory operations during spring loading. @@ -1004,10 +1045,12 @@ declare namespace dragController { * @since 20 */ dataSummary?: unifiedDataChannel.Summary; + /** - * Summary of the dragged data. This field is absent if the source application did not configure data. + * Additional information provided by the source application when initiating the drag operation. + * This field is absent if the source application did not configure it. * - * @type { ?unifiedDataChannel.Summary } + * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 @@ -1078,7 +1121,7 @@ declare namespace dragController { * Typically, applications should use default configurations or set them once during binding. * Use this method sparingly, e.g., for different drag data types requiring varied UX timing. * - * @param { config } The spring loading detection configuration + * @param { DragSpringLoadingConfiguration } config - The spring loading detection configuration * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 diff --git a/api/@ohos.arkui.drawableDescriptor.d.ets b/api/@ohos.arkui.drawableDescriptor.d.ets deleted file mode 100644 index 70c73a174cad9511eb9dc1033799d0db5f197600..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.drawableDescriptor.d.ets +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import image from './@ohos.multimedia.image'; - -/** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * Use the DrawableDescriptor class to get drawable image. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since 10 - */ - constructor(); - - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get pixelMap of drawable image. - * - * @returns { image.PixelMap } Return the PixelMap of the calling DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getPixelMap(): image.PixelMap; -} - -/** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class LayeredDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new LayeredDrawableDescriptor. - * - * @param { DrawableDescriptor } [foreground] - Indicates the foreground option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [background] - Indicates the background option to create LayeredDrawableDescriptor. - * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor( - foreground?: DrawableDescriptor, - background?: DrawableDescriptor, - mask?: DrawableDescriptor - ); - - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the foreground. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of foreground. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getForeground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the background. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getBackground(): DrawableDescriptor; - - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get DrawableDescriptor for the mask. - * - * @returns { DrawableDescriptor } Return the DrawableDescriptor object of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - getMask(): DrawableDescriptor; - - - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get the clip path info of the adaptive icon mask. - * - * @returns { string } Return the clip path info of mask. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static getMaskClipPath(): string; -} - -/** - * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export declare class PixelMapDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - constructor(src?: image.PixelMap); -} - -/** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iterations?: number; -} - -/** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { - /** - * Creates a new AnimatedDrawableDescriptor. - * - * @param { Array } pixelMaps - PixelMap List. - * @param { AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); -} diff --git a/api/@ohos.arkui.drawableDescriptor.d.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index 6c7ff4b6a3120ecd4095d063ccd187c9dcfe086a..6e361e9a73a00e14399cd7a6f746f3a38a5060d0 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -20,63 +20,6 @@ import image from './@ohos.multimedia.image'; -/** - * Indicates the return result of the data to be fetched. - * - * @typedef DrawableDescriptorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorResult { - /** - * DrawableDescriptor width.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly width?: number; - - /** - * DrawableDescriptor height.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly height?: number; -} - -/** - * DrawableDescriptor's option which is used in constructor. - * - * @typedef DrawableDescriptorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorOptions { - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - /** * Use the DrawableDescriptor class to get drawable image. * @@ -96,15 +39,17 @@ declare interface DrawableDescriptorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class DrawableDescriptor { +export declare class DrawableDescriptor { /** * Creates a new DrawableDescriptor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -130,57 +75,10 @@ export class DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPixelMap(): image.PixelMap; - - /** - * Get original width of drawable object. - * - * @returns { number } Return the width of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalWidth(): number; - - /** - * Get original height of drawable object. - * - * @returns { number } Return the height of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalHeight(): number; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { Promise } Return the promise returned by the funciton. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetch(): Promise; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { DrawableDescriptorResult } Return the result of the DrawableDescriptor object. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchSync(): DrawableDescriptorResult; } /** @@ -205,9 +103,10 @@ export class DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class LayeredDrawableDescriptor extends DrawableDescriptor { +export declare class LayeredDrawableDescriptor extends DrawableDescriptor { /** * Creates a new LayeredDrawableDescriptor. * @@ -216,7 +115,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @param { DrawableDescriptor } [mask] - Indicates the mask option to create LayeredDrawableDescriptor. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor( foreground?: DrawableDescriptor, @@ -246,7 +146,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getForeground(): DrawableDescriptor; @@ -274,6 +175,16 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @atomicservice * @since 12 */ + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ getBackground(): DrawableDescriptor; /** @@ -298,11 +209,11 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMask(): DrawableDescriptor; - /** * Get the clip path info of the adaptive icon mask. * @@ -325,7 +236,8 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getMaskClipPath(): string; } @@ -336,28 +248,19 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { * @extends DrawableDescriptor * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class PixelMapDrawableDescriptor extends DrawableDescriptor { +export declare class PixelMapDrawableDescriptor extends DrawableDescriptor { /** * Creates a new PixelMapDrawableDescriptor. * @param { image.PixelMap } src - Indicates the resource to create PixelMapDrawableDescriptor. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(src?: image.PixelMap); - - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap | ResourceStr } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @param { DrawableDescriptorOptions } options - Indicates the option to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(src?: image.PixelMap | ResourceStr, options?: DrawableDescriptorOptions); } /** @@ -367,9 +270,10 @@ export class PixelMapDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -declare interface AnimationOptions { +export declare interface AnimationOptions { /** * The duration of animation playback once. * @@ -377,7 +281,8 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; /** @@ -387,20 +292,10 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iterations?: number; - - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; } /** @@ -410,9 +305,10 @@ declare interface AnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -export class AnimatedDrawableDescriptor extends DrawableDescriptor { +export declare class AnimatedDrawableDescriptor extends DrawableDescriptor { /** * Creates a new AnimatedDrawableDescriptor. * @@ -421,52 +317,8 @@ export class AnimatedDrawableDescriptor extends DrawableDescriptor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(pixelMaps: Array, options?: AnimationOptions); - - /** - * Creates a new AnimatedDrawableDescriptor. - * @param { Array | ResourceStr } pixelMaps - Indicates the resource to create AnimatedDrawableDescriptor. - * @param { ?AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(pixelMaps: Array | ResourceStr, options?: AnimationOptions); - - /** - * Get the running status of animation. - * - * @returns { boolean } Return the running status of animation. - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - isRunning(): boolean; - - /** - * Start the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - start(): void; - - /** - * Stop the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - stop(): void; } diff --git a/api/@ohos.arkui.inspector.d.ets b/api/@ohos.arkui.inspector.d.ets deleted file mode 100644 index d9cd08204298a12478cef2859e9cdecc0684c1b2..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.inspector.d.ets +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -/** - * Used to do observer layout and draw event for component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Used to do observer layout and draw event for component. - * - * @namespace inspector - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare namespace inspector { - - /** - * The ComponentObserver is used to listen for layout and draw events. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The ComponentObserver is used to listen for layout and draw events. - * - * @interface ComponentObserver - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface ComponentObserver { - - /** - * Registers a callback with the corresponding query condition by using the handle. - * This callback is triggered when the component layout complete. - * @param { string } type - type of the listened event. - * @param { ()=>void } callback - callback of the listened event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Registers a callback with the corresponding query condition by using the handle. - * This callback is triggered when the component layout complete. - * @param { 'layout' | 'draw' } type - type of the listened event. - * @param { function } callback - callback of the listened event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - on(type: 'layout' | 'draw', callback: () => void): void; - - /** - * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the component layout complete. - * @param { string } type - type of the listened event. - * @param { ()=>void } callback - callback of the listened event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the component layout complete. - * @param { 'layout' | 'draw' } type - type of the listened event. - * @param { function } callback - callback of the listened event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - off(type: 'layout' | 'draw', callback?: () => void): void; - } - - /** - * Sets the component after layout or draw criteria and returns the corresponding listening handle - * @param { string } id - component id. - * @returns { ComponentObserver } create listener for observer component event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the component after layout or draw criteria and returns the corresponding listening handle - * @param { string } id - component id. - * @returns { ComponentObserver } create listener for observer component event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function createComponentObserver(id: string): ComponentObserver; -} -export default inspector; \ No newline at end of file diff --git a/api/@ohos.arkui.inspector.d.ts b/api/@ohos.arkui.inspector.d.ts index e1cc913b37dcfdee4f89530e88bfd7c29f8f04ab..2db8ffcb75ab4a4726037654d0289b3e5458bbcc 100644 --- a/api/@ohos.arkui.inspector.d.ts +++ b/api/@ohos.arkui.inspector.d.ts @@ -33,7 +33,8 @@ import { Callback } from './@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace inspector { @@ -50,7 +51,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ComponentObserver { @@ -71,7 +73,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'layout', callback: () => void): void; @@ -92,7 +95,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'layout', callback?: () => void): void; @@ -113,7 +117,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'draw', callback: () => void): void; @@ -134,7 +139,8 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'draw', callback?: () => void): void; @@ -178,11 +184,55 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIInspector#createComponentObserver */ function createComponentObserver(id: string): ComponentObserver; + + /** + * Obtains all attributes of the component with the specified ID. + * + * @param { string } id - ID of the component whose attributes are to be obtained. + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @test + * @arkts 1.2 + */ + function getInspectorByKey(id: string): string; + + /** + * Get components tree. + * + * @returns { Object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @test + * @arkts 1.2 + */ + function getInspectorTree(): Object; + + /** + * Sends an event to the component with the specified ID. + * + * @param { string } id - ID of the component for which the event is to be sent. + * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. + * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". + * @returns { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @test + * @arkts 1.2 + */ + function sendEventByKey(id: string, action: number, params: string): boolean; } -export default inspector; +export default inspector; \ No newline at end of file diff --git a/api/@ohos.arkui.node.d.ets b/api/@ohos.arkui.node.d.ets deleted file mode 100644 index 0490532ee6c59fe65fecfe9982fec11f670ef8a8..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.node.d.ets +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -/** - * Export NodeRenderType, RenderOptions, BuilderNode, which is used to create a node trees by builder function and manage the update of the tree. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export NodeRenderType, RenderOptions, BuilderNode, which is used to create a node trees by builder function and manage the update of the tree. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode'; - -/** - * Export BuildOptions which is used to create a node trees by builder function and manage the update of the tree. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { BuildOptions } from './arkui/BuilderNode'; - -/** - * Export NodeController, which defines the controller of node container. Provides lifecycle callbacks for the associated NodeContainer - * and methods to control the child node of the NodeContainer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export NodeController, which defines the controller of node container. Provides lifecycle callbacks for the associated NodeContainer - * and methods to control the child node of the NodeContainer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { NodeController } from './arkui/NodeController'; - -/** - * Export FrameNode. FrameNode defines a basic type of node which contains a RenderNode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export FrameNode. FrameNode defines a basic type of node which contains a RenderNode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { FrameNode, LayoutConstraint } from './arkui/FrameNode'; - -/** - * Export FrameNode. FrameNode defines a basic type of node which contains a RenderNode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { typeNode, NodeAdapter } from './arkui/FrameNode'; - -/** - * Export Graphics. Defines the basic types related to the Graphics. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export Graphics. Defines the basic types related to the Graphics. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4, Rotation, Frame, RoundRect, Circle, CommandPath, ShapeMask, ShapeClip, BorderRadiuses, CornerRadius, Edges, edgeColors, edgeWidths, borderStyles, borderRadiuses, LengthMetricsUnit } from './arkui/Graphics'; - -/** - * Export Graphics. Defines the basic types related to the Graphics. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { LengthUnit, SizeT, LengthMetrics, ColorMetrics } from './arkui/Graphics'; - -/** - * Export RenderNode. RenderNode contains node tree operations and render property operations on node. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export RenderNode. RenderNode contains node tree operations and render property operations on node. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { RenderNode } from './arkui/RenderNode'; - -/** - * Export XComponentNode, which extends FrameNode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Export XComponentNode, which extends FrameNode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { XComponentNode } from './arkui/XComponentNode'; - -/** - * Export Content. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { Content } from './arkui/Content'; - -/** - * Export ComponentContent. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { ComponentContent } from './arkui/ComponentContent'; - -/** - * Export NodeContent. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export { NodeContent } from './arkui/NodeContent'; \ No newline at end of file diff --git a/api/@ohos.arkui.node.d.ts b/api/@ohos.arkui.node.d.ts index 67602a631009b49554a601a4c2adafff09876bc6..18fde8db2e92188b997e70c8b937231b39a03f80 100644 --- a/api/@ohos.arkui.node.d.ts +++ b/api/@ohos.arkui.node.d.ts @@ -29,7 +29,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode'; @@ -38,7 +39,8 @@ export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { BuildOptions } from './arkui/BuilderNode'; @@ -66,7 +68,8 @@ export { InputEventType } from './arkui/BuilderNode'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeController } from './arkui/NodeController'; @@ -93,7 +96,19 @@ export { FrameNode, LayoutConstraint, ExpandMode, UIState } from './arkui/FrameN * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.2 + */ +export { FrameNode, LayoutConstraint, ExpandMode } from './arkui/FrameNode'; + +/** + * Export FrameNode. FrameNode defines a basic type of node which contains a RenderNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { typeNode, NodeAdapter } from './arkui/FrameNode'; @@ -110,7 +125,8 @@ export { typeNode, NodeAdapter } from './arkui/FrameNode'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4, Rotation, Frame, RoundRect, Circle, CommandPath, ShapeMask, ShapeClip, BorderRadiuses, CornerRadius, Rect, Edges, edgeColors, edgeWidths, borderStyles, borderRadiuses, LengthMetricsUnit } from './arkui/Graphics'; @@ -120,7 +136,8 @@ export { DrawContext, Size, Offset, Position, Pivot, Scale, Translation, Matrix4 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { LengthUnit, SizeT, LengthMetrics, ColorMetrics } from './arkui/Graphics'; @@ -137,7 +154,8 @@ export { LengthUnit, SizeT, LengthMetrics, ColorMetrics } from './arkui/Graphics * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { RenderNode } from './arkui/RenderNode'; @@ -164,7 +182,8 @@ export { XComponentNode } from './arkui/XComponentNode'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { Content } from './arkui/Content'; @@ -174,7 +193,8 @@ export { Content } from './arkui/Content'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { ComponentContent } from './arkui/ComponentContent'; @@ -184,6 +204,7 @@ export { ComponentContent } from './arkui/ComponentContent'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ export { NodeContent } from './arkui/NodeContent'; \ No newline at end of file diff --git a/api/@ohos.arkui.observer.d.ets b/api/@ohos.arkui.observer.d.ets deleted file mode 100644 index a3771b8a190d643731e794a5dad3e31534548f62..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.observer.d.ets +++ /dev/null @@ -1,1275 +0,0 @@ -/* - * Copyright (c) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -import { Callback } from './@ohos.base'; -import UIAbilityContext from './application/UIAbilityContext'; -import { NavigationOperation, NavBar,NavPathStack } from './arkui/component/navigation'; -import { ResourceStr } from './arkui/component/units' -import { UIContext } from './@ohos.arkui.UIContext' -/** - * Register callbacks to observe ArkUI behavior. - * - * @namespace uiObserver - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Register callbacks to observe ArkUI behavior. - * - * @namespace uiObserver - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare namespace uiObserver { - /** - * NavDestination state. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * NavDestination state. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - export enum NavDestinationState { - /** - * When the NavDestination is displayed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * When the NavDestination is displayed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_SHOWN = 0, - - /** - * When the NavDestination is hidden. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * When the NavDestination is hidden. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_HIDDEN = 1, - - /** - * When the NavDestination appear. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_APPEAR = 2, - - /** - * When the NavDestination disappear. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_DISAPPEAR = 3, - - /** - * Before the NavDestination is displayed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_WILL_SHOW = 4, - - /** - * Before the NavDestination is hidden. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_WILL_HIDE = 5, - - /** - * Before the NavDestination is appeared. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_WILL_APPEAR = 6, - - /** - * Before the NavDestination is disappeared. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_WILL_DISAPPEAR = 7, - - /** - * When back press event happened in NavDestination. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ON_BACKPRESS = 100 - } - - /** - * Router page state. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Router page state. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export enum RouterPageState { - /** - * When the router page create. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * When the router page create. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ABOUT_TO_APPEAR = 0, - - /** - * When the router page destroy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * When the router page destroy. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ABOUT_TO_DISAPPEAR = 1, - - /** - * When the router page show. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * When the router page show. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ON_PAGE_SHOW = 2, - - /** - * When the router page hide. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * When the router page hide. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ON_PAGE_HIDE = 3, - - /** - * When back press event happened in the router page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * When back press event happened in the router page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ON_BACK_PRESS = 4 - } - - /** - * ScrollEvent type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export enum ScrollEventType { - /** - * When the ScrollEvent start. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SCROLL_START = 0, - - /** - * When the ScrollEvent stop. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SCROLL_STOP = 1 - } - - /** - * TabContent state. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export enum TabContentState { - /** - * When the TabContent hidden. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ON_SHOW = 0, - - /** - * When the TabContent hidden. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - ON_HIDE = 1 - } - - /** - * NavDestination info. - * - * @interface NavDestinationInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * NavDestination info. - * - * @interface NavDestinationInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface NavDestinationInfo { - /** - * Navigation id. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Navigation id. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - navigationId: ResourceStr, - - /** - * Changed NavDestination name. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Changed NavDestination name. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - name: ResourceStr, - - /** - * Changed NavDestination state. - * - * @type { NavDestinationState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Changed NavDestination state. - * - * @type { NavDestinationState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - state: NavDestinationState, - - /** - * NavDestination index. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - index: number; - - /** - * The detailed parameter of NavDestination. - * - * @type { ?Object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - param?: Object; - - /** - * Auto-generated navDestination id, which is different from common property id of Component. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - navDestinationId: string; - } - - /** - * Navigation info. - * - * @interface NavigationInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface NavigationInfo { - /** - * Navigation id. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - navigationId: string; - - /** - * Navigation path stack. - * - * @type { NavPathStack } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - pathStack: NavPathStack; - } - - /** - * ScrollEvent info. - * - * @interface ScrollEventInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface ScrollEventInfo { - /** - * Scroll id. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - id: string, - - /** - * The uniqueId of the scrollable component. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - uniqueId: number, - - /** - * Changed ScrollEvent type. - * - * @type { ScrollEventType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - scrollEvent: ScrollEventType, - - /** - * Changed ScrollEvent offset. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - offset: number - } - - /** - * TabContent info. - * - * @typedef TabContentInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface TabContentInfo { - /** - * TabContent id. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - tabContentId: string, - - /** - * TabContent uniqueId. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - tabContentUniqueId: number, - - /** - * The state of TabContent. - * - * @type { TabContentState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - state: TabContentState, - - /** - * The index of TabContent in Tabs. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - index: number, - - /** - * Tabs id. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - id: string, - - /** - * Tabs uniqueId. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - uniqueId: number - } - - /** - * observer options. - * - * @interface ObserverOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface ObserverOptions { - /** - * component id. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - id: string - } - - /** - * Router page info. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Router page info. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class RouterPageInfo { - /** - * The context of the changed router page. - * - * @type { UIAbilityContext | UIContext } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The context of the changed router page. - * - * @type { UIAbilityContext | UIContext } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - context: UIAbilityContext | UIContext; - - /** - * The index of the changed router page in router stack. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The index of the changed router page in router stack. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - index: number; - - /** - * The name of the changed router page. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The name of the changed router page. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - name: string; - - /** - * The path of the changed router page. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The path of the changed router page. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - path: string; - - /** - * The state of the changed router page. - * - * @type { RouterPageState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * The state of the changed router page. - * - * @type { RouterPageState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - state: RouterPageState; - - /** - * The unique identifier of the router page. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - pageId: string; - } - - /** - * Density info. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export class DensityInfo { - /** - * The context of the changed screen density. - * - * @type { UIContext } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - context: UIContext; - - /** - * The changed screen density. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - density: number; - } - - /** - * NavDestination switch info - * - * @interface NavDestinationSwitchInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface NavDestinationSwitchInfo { - /** - * The context of the navigation operation. - * - * @type { UIAbilityContext | UIContext } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - context: UIAbilityContext | UIContext; - - /** - * From navigation content info. - * - * @type { NavDestinationInfo | NavBar } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - from: NavDestinationInfo | NavBar; - - /** - * To navigation content info. - * - * @type { NavDestinationInfo | NavBar } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - to: NavDestinationInfo | NavBar; - - /** - * The operation type. - * - * @type { NavigationOperation } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - operation: NavigationOperation; - } - - /** - * Indicates the options of NavDestination switch. - * - * @interface NavDestinationSwitchObserverOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface NavDestinationSwitchObserverOptions { - /** - * The navigationId that need observation - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - navigationId: ResourceStr; - } - /** - * Registers a callback function to be called when the navigation destination is updated. - * - * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - * @param { object } options - The options object. - * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Registers a callback function to be called when the navigation destination is updated. - * - * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - * @param { object } options - The options object. - * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function on(type: string, options: T, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { object } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * navigation ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { object } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * navigation ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - export function off(type: string, options: T, callback: Callback): void; - - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Registers a callback function to be called when the navigation destination is updated. - // * - // * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - // * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'navDestinationUpdate', callback: Callback): void; - - export function on(type: string, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'navDestinationUpdate', callback?: Callback): void; - - export function off(type: string, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the scroll event start or stop. - // * - // * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'. - // * @param { ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to be called when the scroll event start or stop. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'scrollEvent', options: ObserverOptions, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'scrollEvent' } type - The type of event to remove the listener for. Must be 'scrollEvent'. - // * @param { ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * scroll ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'scrollEvent', options: ObserverOptions, callback: Callback): void; - - // /** - // * Registers a callback function to be called when the scroll event start or stop. - // * - // * @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'. - // * @param { Callback } callback - The callback function to be called when the scroll event start or stop. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'scrollEvent', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'scrollEvent'} type - The type of event to remove the listener for. Must be 'scrollEvent'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'scrollEvent', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the router page is updated. - // * - // * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the router page is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Registers a callback function to be called when the router page is updated. - // * - // * @param { 'routerPageUpdate' } type - The type of event to listen for. Must be 'routerPageUpdate'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the router page is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @since 11 - // */ - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback: Callback): void; - - // /** - // * Registers a callback function to be called when the screen density is updated. - // * - // * @param { 'densityUpdate' } type - The type of event to listen for. Must be 'densityUpdate'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the screen density is updated. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'densityUpdate', context: UIContext, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'densityUpdate' } type - The type of event to remove the listener for. Must be 'densityUpdate'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'densityUpdate', context: UIContext, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the draw command will be drawn. - // * - // * @param { 'willDraw' } type - The type of event to listen for. Must be 'willDraw'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the draw command will be drawn. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'willDraw', context: UIContext, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'willDraw' } type - The type of event to remove the listener for. Must be 'willDraw'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'willDraw', context: UIContext, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the layout is done. - // * - // * @param { 'didLayout' } type - The type of event to listen for. Must be 'didLayout'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the layout is done. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'didLayout', context: UIContext, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'didLayout' } type - The type of event to remove the listener for. Must be 'didLayout'. - // * @param { UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'didLayout', context: UIContext, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the tabContent is showed or hidden. - // * - // * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'. - // * @param { ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to be called when when the tabContent is showed or hidden. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'tabContentUpdate', options: ObserverOptions, callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'tabContentUpdate' } type - The type of event to remove the listener for. Must be 'tabContentUpdate'. - // * @param { ObserverOptions } options - The options object. - // * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - // * Tabs ID will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'tabContentUpdate', options: ObserverOptions, callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the tabContent is showed or hidden. - // * - // * @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'. - // * @param { Callback } callback - The callback function to be called when the tabContent is showed or hidden. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on(type: 'tabContentUpdate', callback: Callback): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'tabContentUpdate'} type - The type of event to remove the listener for. Must be 'tabContentUpdate'. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off(type: 'tabContentUpdate', callback?: Callback): void; - - // /** - // * Registers a callback function to be called when the navigation switched to a new navDestination. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } callback - The callback function to be called when the navigation switched to a new navDestination. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on( - // type: 'navDestinationSwitch', - // context: UIAbilityContext | UIContext, - // callback: Callback - // ): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off( - // type: 'navDestinationSwitch', - // context: UIAbilityContext | UIContext, - // callback?: Callback - // ): void; - - // /** - // * Registers a callback function to be called when the navigation switched to a new navDestination. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { NavDestinationSwitchObserverOptions } observerOptions - Options. - // * @param { Callback } callback - The callback function to be called when the navigation switched to a new navDestination. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function on( - // type: 'navDestinationSwitch', - // context: UIAbilityContext | UIContext, - // observerOptions: NavDestinationSwitchObserverOptions, - // callback: Callback - // ): void; - - // /** - // * Removes a callback function that was previously registered with `on()`. - // * - // * @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'. - // * @param { UIAbilityContext | UIContext } context - The context scope of the observer. - // * @param { NavDestinationSwitchObserverOptions } observerOptions - Options. - // * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type - // * will be removed. - // * @syscap SystemCapability.ArkUI.ArkUI.Full - // * @crossplatform - // * @atomicservice - // * @since 12 - // */ - // export function off( - // type: 'navDestinationSwitch', - // context: UIAbilityContext | UIContext, - // observerOptions: NavDestinationSwitchObserverOptions, - // callback?: Callback - // ): void; -} -export default uiObserver; \ No newline at end of file diff --git a/api/@ohos.arkui.observer.d.ts b/api/@ohos.arkui.observer.d.ts index 29af3503e28d49e2c453312902b592d5ba136eda..dcc34ce7762a7935db1f6c721c8b0778ea3d7cde 100644 --- a/api/@ohos.arkui.observer.d.ts +++ b/api/@ohos.arkui.observer.d.ts @@ -17,10 +17,18 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { NavPathStack, NavigationOperation, NavBar, ResourceStr } from '@ohos.arkui.component'; +import { UIContext } from '@ohos.arkui.UIContext'; +import UIAbilityContext from './application/UIAbilityContext'; +import { Callback } from './@ohos.base'; +/*** endif */ + +/*** if arkts 1.1 */ import type { Callback } from './@ohos.base'; import type UIAbilityContext from './application/UIAbilityContext'; import type { NavigationOperation, NavBar } from '../component/navigation'; +/*** endif */ /** * Register callbacks to observe ArkUI behavior. @@ -37,7 +45,8 @@ import type { NavigationOperation, NavBar } from '../component/navigation'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace uiObserver { /** @@ -55,7 +64,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum NavDestinationState { /** @@ -71,7 +81,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_SHOWN = 0, @@ -88,7 +99,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_HIDDEN = 1, @@ -98,7 +110,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_APPEAR = 2, @@ -108,7 +121,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_DISAPPEAR = 3, @@ -118,7 +132,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_SHOW = 4, @@ -128,7 +143,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_HIDE = 5, @@ -138,7 +154,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_APPEAR = 6, @@ -148,7 +165,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_WILL_DISAPPEAR = 7, @@ -178,7 +196,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_BACKPRESS = 100 } @@ -198,7 +217,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum RouterPageState { /** @@ -214,7 +234,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_APPEAR = 0, @@ -231,7 +252,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ABOUT_TO_DISAPPEAR = 1, @@ -248,7 +270,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_PAGE_SHOW = 2, @@ -265,7 +288,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_PAGE_HIDE = 3, @@ -282,7 +306,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_BACK_PRESS = 4 } @@ -294,7 +319,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ScrollEventType { /** @@ -303,7 +329,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_START = 0, @@ -313,7 +340,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_STOP = 1 } @@ -325,7 +353,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum TabContentState { /** @@ -334,7 +363,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_SHOW = 0, @@ -344,7 +374,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ON_HIDE = 1 } @@ -364,7 +395,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationInfo { /** @@ -382,7 +414,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: ResourceStr, @@ -401,7 +434,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: ResourceStr, @@ -420,7 +454,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: NavDestinationState, @@ -431,7 +466,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -442,7 +478,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ param?: Object; @@ -453,7 +490,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navDestinationId: string; @@ -487,7 +525,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavigationInfo { /** @@ -497,7 +536,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: string; @@ -508,7 +548,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pathStack: NavPathStack; @@ -531,7 +572,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ScrollEventInfo { /** @@ -541,7 +583,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string, @@ -552,7 +595,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId: number, @@ -563,7 +607,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scrollEvent: ScrollEventType, @@ -574,7 +619,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number, @@ -597,7 +643,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TabContentInfo { /** @@ -607,7 +654,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tabContentId: string, @@ -618,7 +666,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tabContentUniqueId: number, @@ -629,7 +678,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: TabContentState, @@ -640,7 +690,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number, @@ -651,7 +702,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string, @@ -662,7 +714,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uniqueId: number } @@ -674,7 +727,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ObserverOptions { /** @@ -684,7 +738,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ id: string } @@ -702,7 +757,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class RouterPageInfo { /** @@ -720,7 +776,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIAbilityContext | UIContext; @@ -739,7 +796,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ index: number; @@ -758,7 +816,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -777,7 +836,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ path: string; @@ -796,7 +856,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: RouterPageState; @@ -807,7 +868,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pageId: string; } @@ -818,7 +880,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class DensityInfo { /** @@ -828,7 +891,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIContext; @@ -839,7 +903,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ density: number; } @@ -851,7 +916,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationSwitchInfo { /** @@ -861,7 +927,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ context: UIAbilityContext | UIContext; @@ -872,7 +939,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ from: NavDestinationInfo | NavBar; @@ -883,7 +951,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: NavDestinationInfo | NavBar; @@ -894,7 +963,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ operation: NavigationOperation; } @@ -906,7 +976,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NavDestinationSwitchObserverOptions { /** @@ -916,7 +987,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ navigationId: ResourceStr; } @@ -943,6 +1015,20 @@ declare namespace uiObserver { * @since 12 */ export function on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; + + /** + * Registers a callback function to be called when the navigation destination is updated. + * + * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. + * @param { NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback } callback - The callback function to be called when the navigation destination is updated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function on(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback: Callback): void; /** * Removes a callback function that was previously registered with `on()`. @@ -968,6 +1054,21 @@ declare namespace uiObserver { * @since 12 */ export function off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; + + /** + * Removes a callback function that was previously registered with `on()`. + * + * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. + * @param { NavDestinationSwitchObserverOptions } options - The options object. + * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and + * navigation ID will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export function off(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback?: Callback): void; /** * Registers a callback function to be called when the navigation destination is updated. @@ -986,7 +1087,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'navDestinationUpdate', callback: Callback): void; @@ -1009,7 +1111,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'navDestinationUpdate', callback?: Callback): void; @@ -1022,7 +1125,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'scrollEvent', options: ObserverOptions, callback: Callback): void; @@ -1036,7 +1140,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'scrollEvent', options: ObserverOptions, callback?: Callback): void; @@ -1048,7 +1153,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'scrollEvent', callback: Callback): void; @@ -1061,7 +1167,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'scrollEvent', callback?: Callback): void; @@ -1084,7 +1191,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback: Callback): void; @@ -1109,7 +1217,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback?: Callback): void; @@ -1122,7 +1231,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'densityUpdate', context: UIContext, callback: Callback): void; @@ -1136,7 +1246,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'densityUpdate', context: UIContext, callback?: Callback): void; @@ -1149,7 +1260,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'willDraw', context: UIContext, callback: Callback): void; @@ -1163,7 +1275,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'willDraw', context: UIContext, callback?: Callback): void; @@ -1176,7 +1289,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'didLayout', context: UIContext, callback: Callback): void; @@ -1190,7 +1304,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'didLayout', context: UIContext, callback?: Callback): void; @@ -1203,7 +1318,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'tabContentUpdate', options: ObserverOptions, callback: Callback): void; @@ -1217,7 +1333,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'tabContentUpdate', options: ObserverOptions, callback?: Callback): void; @@ -1229,7 +1346,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on(type: 'tabContentUpdate', callback: Callback): void; @@ -1242,7 +1360,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off(type: 'tabContentUpdate', callback?: Callback): void; @@ -1255,7 +1374,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on( type: 'navDestinationSwitch', @@ -1273,7 +1393,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off( type: 'navDestinationSwitch', @@ -1291,7 +1412,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function on( type: 'navDestinationSwitch', @@ -1311,7 +1433,8 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function off( type: 'navDestinationSwitch', diff --git a/api/@ohos.arkui.performanceMonitor.d.ets b/api/@ohos.arkui.performanceMonitor.d.ets deleted file mode 100644 index 455156910f791455b4486d30cd9e7c751b95f53d..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.performanceMonitor.d.ets +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (C) 2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -/** - * Provides interfaces to monitor a scene for performance measurement. - * - *

These interfaces are used to monitor the begin, end, and value changes of finger processes that last for at least 3 ms. - * - *

Example: - * import "@ohos.arkui.performanceMonitor.d.ts" - * To start scene monitoring that is expected to complete within 5 ms: - *

{@code
- * performanceMonitor.begin(string, ActionType, string);
- * //scene finished
- * performanceMonitor.end(string);
- * }
- * - *

Each {@code begin} matches one {@code end}, and they must have the same scene id. - * - * @namespace performanceMonitor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - declare namespace performanceMonitor { - /** - * Enumerates the input event type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - export enum ActionType { - /** - * The user presses the finger on the screen. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - LAST_DOWN = 0, - - /** - * The user lifts up the finger from the screen. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - LAST_UP = 1, - - /** - * The user first moves the finger after pressing down the screen. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - FIRST_MOVE = 2 - } - - /** - * Enumerates the input source type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - export enum SourceType { - /** - * The user touches the screen to trigger the scene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - PERF_TOUCH_EVENT = 0, - - /** - * TThe user uses the mouse to trigger the scene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - PERF_MOUSE_EVENT = 1, - - /** - * The user uses the touchpad to trigger the scene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - PERF_TOUCHPAD_EVENT = 2, - - /** - * The user uses the joystick to trigger the scene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - PERF_JOYSTICK_EVENT = 3, - - /** - * The user uses the keyboard to trigger the scene. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - PERF_KEY_EVENT = 4 - } - - /** - * Begin monitoring an application scene. - * - * @param { string } scene Indicates the scene name. - * @param { ActionType } startInputType Indicates the scene input event type. - * @param { string } note Indicates the app expected info delivered. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - function begin(scene: string, startInputType: ActionType, note?: string): void; - - /** - * End monitoring an application scene. - * - * @param { string } scene Indicates the scene name. It must be the same with the {@code scene} of start. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - function end(scene: string): void; - - /** - * recordInputEventTime monitoring an application scene. - * - * @param { ActionType } type - Indicates the scene input event type. - * @param { SourceType } sourceType - Indicates the scene input source type. - * @param { number } time - Indicates the scene input time. - * @throws { BusinessError } 202 - not system application. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - function recordInputEventTime(type: ActionType, sourceType: SourceType, time: number): void; -} -export default performanceMonitor; \ No newline at end of file diff --git a/api/@ohos.arkui.performanceMonitor.d.ts b/api/@ohos.arkui.performanceMonitor.d.ts index bb553c4286dfb4e3c3d86e0d8abb154caeedddf9..5f64735337d276e29544a4254f87cb593e156ce7 100644 --- a/api/@ohos.arkui.performanceMonitor.d.ts +++ b/api/@ohos.arkui.performanceMonitor.d.ts @@ -37,7 +37,8 @@ * @namespace performanceMonitor * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace performanceMonitor { /** @@ -46,14 +47,16 @@ declare namespace performanceMonitor { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ActionType { /** * The user presses the finger on the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ LAST_DOWN = 0, @@ -61,7 +64,8 @@ declare namespace performanceMonitor { * The user lifts up the finger from the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ LAST_UP = 1, @@ -69,7 +73,8 @@ declare namespace performanceMonitor { * The user first moves the finger after pressing down the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ FIRST_MOVE = 2 } @@ -80,14 +85,16 @@ declare namespace performanceMonitor { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SourceType { /** * The user touches the screen to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERF_TOUCH_EVENT = 0, @@ -95,7 +102,8 @@ declare namespace performanceMonitor { * TThe user uses the mouse to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERF_MOUSE_EVENT = 1, @@ -103,7 +111,8 @@ declare namespace performanceMonitor { * The user uses the touchpad to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERF_TOUCHPAD_EVENT = 2, @@ -111,7 +120,8 @@ declare namespace performanceMonitor { * The user uses the joystick to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERF_JOYSTICK_EVENT = 3, @@ -119,7 +129,8 @@ declare namespace performanceMonitor { * The user uses the keyboard to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PERF_KEY_EVENT = 4 } @@ -132,7 +143,8 @@ declare namespace performanceMonitor { * @param { string } note Indicates the app expected info delivered. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function begin(scene: string, startInputType: ActionType, note?: string): void; @@ -142,7 +154,8 @@ declare namespace performanceMonitor { * @param { string } scene Indicates the scene name. It must be the same with the {@code scene} of start. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function end(scene: string): void; @@ -155,7 +168,8 @@ declare namespace performanceMonitor { * @throws { BusinessError } 202 - not system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function recordInputEventTime(type: ActionType, sourceType: SourceType, time: number): void; } diff --git a/api/@ohos.arkui.shape.d.ets b/api/@ohos.arkui.shape.d.ets deleted file mode 100644 index 25dfdb05b373843345374bc1be18444a74dbc9b7..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.shape.d.ets +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (C) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units' - - -/** - * Interface for shape size properties. - * - * @interface ShapeSize - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export interface ShapeSize { - /** - * Defines the width of Shape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - width?: number | string; - - /** - * Defines the height of Shape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - height?: number | string; -} - -/** - * Interface for RectShape constructor parameters. - * - * @interface RectShapeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export interface RectShapeOptions extends ShapeSize { - /** - * Defines the corner radius of the RectShape. - * @type { ? (number | string | Array) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - radius?: number | string | Array; -} - -/** - * Interface for RectShape constructor parameters with separate radius values. - * - * @interface RoundRectShapeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export interface RoundRectShapeOptions extends ShapeSize { - /** - * Defines the width of the corner radius for RectShape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - radiusWidth?: number | string; - - /** - * Defines the height of the corner radius for RectShape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - radiusHeight?: number | string; -} - -/** - * Interface for PathShape constructor parameters. - * - * @interface PathShapeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export interface PathShapeOptions { - /** - * Defines the commands for drawing the PathShape. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 12 - */ - commands?: string; -} - -/** - * Common shape method class - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class CommonShapeMethod { - /** - * Sets coordinate offset relative to the layout completion position. - * - * @param { Position } offset - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - offset(offset: Position): T; - - /** - * Sets the fill color of the shape. - * - * @param { ResourceColor } color - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - fill(color: ResourceColor): T; - - /** - * Sets the position of the shape. - * - * @param { Position } position - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - position(position: Position): T; -} - -/** - * Base shape class - * - * @extends CommonShapeMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class BaseShape extends CommonShapeMethod { - /** - * Sets the width of the shape. - * - * @param { Length } width - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - width(width: Length): T; - - /** - * Sets the height of the shape. - * - * @param { Length } height - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - height(height: Length): T; - - /** - * Sets the size of the shape. - * - * @param { SizeOptions } size - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - size(size: SizeOptions): T; -} - -/** - * Defines a rect drawing class. - * - * @extends BaseShape - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class RectShape extends BaseShape { - /** - * Constructor. - * - * @param { RectShapeOptions | RoundRectShapeOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - constructor(options?: RectShapeOptions | RoundRectShapeOptions); - - /** - * Sets the width of the corner radius for RectShape. - * - * @param { number | string } rWidth - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - radiusWidth(rWidth: number | string): RectShape; - - /** - * Sets the height of the corner radius for RectShape. - * - * @param { number | string } rHeight - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - radiusHeight(rHeight: number | string): RectShape; - - /** - * Sets the corner radius for RectShape. - * - * @param { number | string | Array } radius - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - radius(radius: number | string | Array): RectShape; -} - -/** - * Defines a circle drawing class. - * - * @extends BaseShape - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class CircleShape extends BaseShape { - /** - * Constructor. - * - * @param { ShapeSize } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - constructor(options?: ShapeSize); -} - -/** - * Defines an ellipse drawing class. - * - * @extends BaseShape - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class EllipseShape extends BaseShape { - /** - * Constructor. - * - * @param { ShapeSize } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - constructor(options?: ShapeSize); -} - -/** - * Defines a path drawing class. - * - * @extends CommonShapeMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -export declare class PathShape extends CommonShapeMethod { - /** - * Constructor. - * - * @param { PathShapeOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - constructor(options?: PathShapeOptions); - - /** - * Sets the commands for drawing the PathShape. - * - * @param { string } commands - * @returns { PathShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - commands(commands: string): PathShape; -} \ No newline at end of file diff --git a/api/@ohos.arkui.shape.d.ts b/api/@ohos.arkui.shape.d.ts index f4688f6e5c8e55933a4ed6dce5fd5772008173d0..a7ada91e5cadc0a1fd9c0cfcb8e3d2ca3044e146 100644 --- a/api/@ohos.arkui.shape.d.ts +++ b/api/@ohos.arkui.shape.d.ts @@ -18,7 +18,9 @@ * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units' +/*** endif */ /** * Interface for shape size properties. @@ -28,16 +30,18 @@ * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface ShapeSize { +export interface ShapeSize { /** * Defines the width of Shape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width?: number | string; @@ -47,7 +51,8 @@ interface ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number | string; } @@ -61,16 +66,18 @@ interface ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface RectShapeOptions extends ShapeSize { +export interface RectShapeOptions extends ShapeSize { /** * Defines the corner radius of the RectShape. - * @type { ? (number | string | Array) } + * @type { ? (number | string | Array) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius?: number | string | Array; } @@ -84,16 +91,18 @@ interface RectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface RoundRectShapeOptions extends ShapeSize { +export interface RoundRectShapeOptions extends ShapeSize { /** * Defines the width of the corner radius for RectShape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusWidth?: number | string; @@ -103,7 +112,8 @@ interface RoundRectShapeOptions extends ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusHeight?: number | string; } @@ -116,16 +126,18 @@ interface RoundRectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ -interface PathShapeOptions { +export interface PathShapeOptions { /** * Defines the commands for drawing the PathShape. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ commands?: string; } @@ -137,7 +149,8 @@ interface PathShapeOptions { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class CommonShapeMethod { /** @@ -149,7 +162,8 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset(offset: Position): T; @@ -162,7 +176,8 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fill(color: ResourceColor): T; @@ -175,7 +190,8 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position(position: Position): T; } @@ -188,7 +204,8 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class BaseShape extends CommonShapeMethod { /** @@ -200,7 +217,8 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width(width: Length): T; @@ -213,7 +231,8 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height(height: Length): T; @@ -226,7 +245,8 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size(size: SizeOptions): T; } @@ -239,7 +259,8 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class RectShape extends BaseShape { /** @@ -250,7 +271,8 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: RectShapeOptions | RoundRectShapeOptions); @@ -263,7 +285,8 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusWidth(rWidth: number | string): RectShape; @@ -276,7 +299,8 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radiusHeight(rHeight: number | string): RectShape; @@ -289,7 +313,8 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ radius(radius: number | string | Array): RectShape; } @@ -302,7 +327,8 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class CircleShape extends BaseShape { /** @@ -313,7 +339,8 @@ export declare class CircleShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: ShapeSize); } @@ -326,7 +353,8 @@ export declare class CircleShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class EllipseShape extends BaseShape { /** @@ -337,7 +365,8 @@ export declare class EllipseShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: ShapeSize); } @@ -350,7 +379,8 @@ export declare class EllipseShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class PathShape extends CommonShapeMethod { /** @@ -361,7 +391,8 @@ export declare class PathShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(options?: PathShapeOptions); @@ -374,7 +405,8 @@ export declare class PathShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ commands(commands: string): PathShape; } \ No newline at end of file diff --git a/api/@ohos.arkui.stateManagement.d.ets b/api/@ohos.arkui.stateManagement.d.ets index f29f2f0d28eec854dd65068f5f504295a35ca84b..7bfe12e22c9d0681ab5afddc9cd0ef276b5c5c38 100644 --- a/api/@ohos.arkui.stateManagement.d.ets +++ b/api/@ohos.arkui.stateManagement.d.ets @@ -21,14 +21,18 @@ export * from './arkui/stateManagement/common'; export * from './arkui/stateManagement/runtime'; -export * from './arkui/stateManagement/storage'; +export * from './arkui/stateManagement/base/backingValue'; export * from './arkui/stateManagement/base/decoratorBase'; export * from './arkui/stateManagement/base/iObservedObject'; +export * from './arkui/stateManagement/base/mutableStateMeta'; export * from './arkui/stateManagement/decorators/decoratorState'; export * from './arkui/stateManagement/decorators/decoratorLink'; +export * from './arkui/stateManagement/decorators/decoratorObjectLink'; export * from './arkui/stateManagement/decorators/decoratorProp'; +export * from './arkui/stateManagement/decorators/decoratorProvide'; +export * from './arkui/stateManagement/decorators/decoratorConsume'; export * from './arkui/stateManagement/decorators/decoratorStorageLink'; export * from './arkui/stateManagement/decorators/decoratorStorageProp'; export * from './arkui/stateManagement/decorators/decoratorWatch'; export * from './arkui/stateManagement/storages/appStorage'; -export * from './arkui/stateManagement/storages/localStorage'; \ No newline at end of file +export * from './arkui/stateManagement/storages/localStorage'; diff --git a/api/@ohos.arkui.theme.d.ets b/api/@ohos.arkui.theme.d.ets deleted file mode 100644 index bd4f371105a7ebeef797d5dc9b461f52b064df4f..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.theme.d.ets +++ /dev/null @@ -1,672 +0,0 @@ - -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { ResourceColor } from './arkui/component/units' -/** - * Defines the struct of Theme. - * - * @interface Theme - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare interface Theme { - /** - * Define tokens associated with color resources. - * - * @type { Colors } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - colors: Colors; -} - -/** - * Defines the struct of Colors. - * - * @interface Colors - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare interface Colors { - - /** - * System brand Color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - brand: ResourceColor; - - /** - * System warning Color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - warning: ResourceColor; - - /** - * System alert Color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - alert: ResourceColor; - - /** - * System confirm Color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - confirm: ResourceColor; - - /** - * First level text color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontPrimary: ResourceColor; - - /** - * Secondary text color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontSecondary: ResourceColor; - - /** - * tertiary text color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontTertiary: ResourceColor; - - /** - * Fourth text color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontFourth: ResourceColor; - - /** - * Emphasize text color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontEmphasize: ResourceColor; - - /** - * First level text inversion, used on colored backgrounds. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontOnPrimary: ResourceColor; - - /** - * Secondary level text inversion, used on colored backgrounds. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontOnSecondary: ResourceColor; - - /** - * Tertiary level text inversion, used on colored backgrounds. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontOnTertiary: ResourceColor; - - /** - * Fourth level text inversion, used on colored backgrounds. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontOnFourth: ResourceColor; - - /** - * First level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconPrimary: ResourceColor; - - /** - * Secondary level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconSecondary: ResourceColor; - - /** - * Tertiary level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconTertiary: ResourceColor; - - /** - * Fourth level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconFourth: ResourceColor; - - /** - * Emphasize level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconEmphasize: ResourceColor; - - /** - * Secondary emphasize level icon color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconSubEmphasize: ResourceColor; - - /** - * First level icon reversed, used on a colored background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconOnPrimary: ResourceColor; - - /** - * Secondary level icon reversed, used on a colored background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconOnSecondary: ResourceColor; - - /** - * Tertiary level icon reversed, used on a colored background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconOnTertiary: ResourceColor; - - /** - * Fourth level icon reversed, used on a colored background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - iconOnFourth: ResourceColor; - - /** - * System Primary level background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundPrimary: ResourceColor; - - /** - * System Secondary level background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundSecondary: ResourceColor; - - /** - * System tertiary level background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundTertiary: ResourceColor; - - /** - * System fourth level background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundFourth: ResourceColor; - - /** - * System emphasize level background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundEmphasize: ResourceColor; - - /** - * CompForegroundPrimary color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compForegroundPrimary: ResourceColor; - - /** - * CompBackgroundPrimary color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundPrimary: ResourceColor; - - /** - * CompBackgroundPrimaryTran color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundPrimaryTran: ResourceColor; - - /** - * CompBackgroundPrimaryContrary color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundPrimaryContrary: ResourceColor; - - /** - * CompBackgroundGray color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundGray: ResourceColor; - - /** - * 10% black universal control background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundSecondary: ResourceColor; - - /** - * 5% black universal control background. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundTertiary: ResourceColor; - - /** - * 100% bright brand background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundEmphasize: ResourceColor; - - /** - * Black neutral high gloss color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundNeutral: ResourceColor; - - /** - * 20% High gloss brand background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compEmphasizeSecondary: ResourceColor; - - /** - * 10% High gloss brand background color. - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compEmphasizeTertiary: ResourceColor; - - /** - * Universal Division Line Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compDivider: ResourceColor; - - /** - * CompCommonContrary Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compCommonContrary: ResourceColor; - - /** - * CompBackgroundFocus Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compBackgroundFocus: ResourceColor; - - /** - * CompFocusedPrimary Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compFocusedPrimary: ResourceColor; - - /** - * CompFocusedSecondary Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compFocusedSecondary: ResourceColor; - - /** - * CompFocusedTertiary Color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - compFocusedTertiary: ResourceColor; - - /** - * Hover interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactiveHover: ResourceColor; - - /** - * Pressed interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactivePressed: ResourceColor; - - /** - * Focus interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactiveFocus: ResourceColor; - - /** - * Active interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactiveActive: ResourceColor; - - /** - * Select interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactiveSelect: ResourceColor; - - /** - * Click interactive color - * - * @type { ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - interactiveClick: ResourceColor; -} - -/** - * Defines the struct of CustomTheme. - * - * @interface CustomTheme - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare interface CustomTheme { - /** - * Define tokens associated with color resources.. - * - * @type { ?CustomColors } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - colors?: CustomColors; -} - -/** - * Defines the struct of CustomColors. - * - * @typedef { Partial } CustomColors - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export type CustomColors = Partial; - -/** - * Class ThemeControl provides the Theme management for whole Ability and pages. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class ThemeControl { - /** - * Sets the default Theme: - * - for whole Ability when invoked from the Ability level code. - * - for the ArkUI page and for later opened pages when invoked at the ArkUI page level. - * - * @param { CustomTheme } theme - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static setDefaultTheme(theme: CustomTheme): void; -} diff --git a/api/@ohos.arkui.theme.d.ts b/api/@ohos.arkui.theme.d.ts index bec047f52697f106ecc076ddb9293cfb431d6a38..3b7c47a87728e0bce7d5f0a7a0b5d707265a3cdc 100644 --- a/api/@ohos.arkui.theme.d.ts +++ b/api/@ohos.arkui.theme.d.ts @@ -18,6 +18,11 @@ * @file * @kit ArkUI */ + +/*** if arkts 1.2 */ +import { ResourceColor } from './arkui/component/units'; +/*** endif */ + /** * Defines the struct of Theme. * @@ -25,7 +30,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Theme { /** @@ -35,7 +41,8 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colors: Colors; } @@ -47,7 +54,8 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Colors { @@ -58,7 +66,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ brand: ResourceColor; @@ -69,7 +78,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ warning: ResourceColor; @@ -80,7 +90,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alert: ResourceColor; @@ -91,7 +102,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ confirm: ResourceColor; @@ -102,7 +114,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontPrimary: ResourceColor; @@ -113,7 +126,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSecondary: ResourceColor; @@ -124,7 +138,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontTertiary: ResourceColor; @@ -135,7 +150,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFourth: ResourceColor; @@ -146,7 +162,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontEmphasize: ResourceColor; @@ -157,7 +174,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnPrimary: ResourceColor; @@ -168,7 +186,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnSecondary: ResourceColor; @@ -179,7 +198,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnTertiary: ResourceColor; @@ -190,7 +210,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontOnFourth: ResourceColor; @@ -201,7 +222,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconPrimary: ResourceColor; @@ -212,7 +234,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconSecondary: ResourceColor; @@ -223,7 +246,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconTertiary: ResourceColor; @@ -234,7 +258,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconFourth: ResourceColor; @@ -245,7 +270,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconEmphasize: ResourceColor; @@ -256,7 +282,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconSubEmphasize: ResourceColor; @@ -267,7 +294,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnPrimary: ResourceColor; @@ -278,7 +306,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnSecondary: ResourceColor; @@ -289,7 +318,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnTertiary: ResourceColor; @@ -300,7 +330,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ iconOnFourth: ResourceColor; @@ -311,7 +342,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundPrimary: ResourceColor; @@ -322,7 +354,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundSecondary: ResourceColor; @@ -333,7 +366,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundTertiary: ResourceColor; @@ -344,7 +378,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundFourth: ResourceColor; @@ -355,7 +390,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundEmphasize: ResourceColor; @@ -366,7 +402,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compForegroundPrimary: ResourceColor; @@ -377,7 +414,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimary: ResourceColor; @@ -388,7 +426,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimaryTran: ResourceColor; @@ -399,7 +438,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundPrimaryContrary: ResourceColor; @@ -410,7 +450,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundGray: ResourceColor; @@ -421,7 +462,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundSecondary: ResourceColor; @@ -432,7 +474,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundTertiary: ResourceColor; @@ -443,7 +486,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundEmphasize: ResourceColor; @@ -454,7 +498,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundNeutral: ResourceColor; @@ -465,7 +510,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compEmphasizeSecondary: ResourceColor; @@ -476,7 +522,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compEmphasizeTertiary: ResourceColor; @@ -487,7 +534,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compDivider: ResourceColor; @@ -498,7 +546,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compCommonContrary: ResourceColor; @@ -509,7 +558,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compBackgroundFocus: ResourceColor; @@ -520,7 +570,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedPrimary: ResourceColor; @@ -531,7 +582,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedSecondary: ResourceColor; @@ -542,7 +594,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compFocusedTertiary: ResourceColor; @@ -553,7 +606,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveHover: ResourceColor; @@ -564,7 +618,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactivePressed: ResourceColor; @@ -575,7 +630,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveFocus: ResourceColor; @@ -586,7 +642,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveActive: ResourceColor; @@ -597,7 +654,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveSelect: ResourceColor; @@ -608,7 +666,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interactiveClick: ResourceColor; } @@ -620,7 +679,8 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface CustomTheme { /** @@ -630,9 +690,23 @@ export declare interface CustomTheme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ colors?: CustomColors; + + /** + * Define tokens associated with dark mode color resources. + * + * @type { ?CustomDarkColors } + * @default If not set darkColors, color value will same as colors under light mode and will not change with color + * mode, unless the color is setted by resource in dark directory. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + darkColors?: CustomDarkColors; } /** @@ -646,13 +720,37 @@ export declare interface CustomTheme { */ export declare type CustomColors = Partial; +/** + * Defines the struct of CustomColors. + * + * @typedef { Partial } CustomColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +export type CustomColors = Partial; + +/** + * Defines the struct of CustomDarkColors. + * + * @typedef { Partial } CustomDarkColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export declare type CustomDarkColors = Partial; + /** * Class ThemeControl provides the Theme management for whole Ability and pages. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare class ThemeControl { /** @@ -664,7 +762,8 @@ export declare class ThemeControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static setDefaultTheme(theme: CustomTheme): void; } diff --git a/api/@ohos.arkui.uiExtension.d.ets b/api/@ohos.arkui.uiExtension.d.ets deleted file mode 100644 index 52044d06c4538ac9bf645045575bd19a4cc723c2..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.uiExtension.d.ets +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - - - -import { Callback } from './@ohos.base'; -import window from './@ohos.window'; -/** - * uiExtension. - * - * @namespace uiExtension - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -declare namespace uiExtension { - /** - * The proxy of the UIExtension window. - * - * @interface WindowProxy - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface WindowProxy { - /** - * Get the avoid area. - * - * @param { window.AvoidAreaType } type - Type of the avoid area. - * @returns { window.AvoidArea } Area where the window cannot be displayed. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - getWindowAvoidArea(type: window.AvoidAreaType): window.AvoidArea; - - /** - * Register the callback of avoidAreaChange. - * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback } callback - Callback used to return the avoid area information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - // on(type: 'avoidAreaChange', callback: Callback): void; - on(type: string, callback: Callback):void; - - /** - * Unregister the callback of avoidAreaChange. - * - * @param { 'avoidAreaChange' } type - The value is fixed at 'avoidAreaChange', indicating the event of changes to the avoid area. - * @param { Callback } callback - Callback used to return the avoid area information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - // off(type: 'avoidAreaChange', callback?: Callback): void; - off(type: string, callback?: Callback):void; - - /** - * Register the callback of windowSizeChange. - * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - // on(type: 'windowSizeChange', callback: Callback): void; - - /** - * Unregister the callback of windowSizeChange. - * - * @param { 'windowSizeChange' } type - The value is fixed at 'windowSizeChange', indicating the window size change event. - * @param { Callback } callback - Callback used to return the window size. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - // off(type: 'windowSizeChange', callback?: Callback): void; - - /** - * Hide the non-secure windows. - * When called by modal UIExtension and shouldHide == false, the "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS" permission is required. - * - * @permission ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS - * @param { boolean } shouldHide - Hide the non-secure windows if true, otherwise means the opposite. - * @returns { Promise } - The promise returned by the function. - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 1300002 - Abnormal state. Possible causes: - *
1. Permission denied. Interface caller does not have permission "ohos.permission.ALLOW_SHOW_NON_SECURE_WINDOWS". - *
2. The UIExtension window proxy is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - hideNonSecureWindows(shouldHide: boolean): Promise; - - /** - * Create sub window. - * - * @param { string } name - window name of sub window. - * @param { window.SubWindowOptions } subWindowOptions - options of sub window creation. - * @returns { Promise } Promise used to return the subwindow. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300005 - This window proxy is abnormal. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @StageModelOnly - * @atomicservice - * @since 12 - */ - createSubWindowWithOptions(name: string, subWindowOptions: window.SubWindowOptions): Promise; - - /** - * Set the watermark flag on the UIExtension window - * - * @param { boolean } enable - Add water mark flag to the UIExtension window if true, or remove flag if false - * @returns { Promise } - The promise returned by the function - * @throws { BusinessError } 1300002 - The UIExtension window proxy is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @throws { BusinessError } 1300008 - The display device is abnormal. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - setWaterMarkFlag(enable: boolean): Promise; - } - - /** - * Defines the avoid area information. - * - * @interface AvoidAreaInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface AvoidAreaInfo { - /** - * Describes the type of avoid area. - * - * @type { window.AvoidAreaType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - type: window.AvoidAreaType; - - /** - * Describes the position and size of avoid area. - * - * @type { window.AvoidArea } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - area: window.AvoidArea; - } -} - -export default uiExtension; diff --git a/api/@ohos.arkui.uiExtension.d.ts b/api/@ohos.arkui.uiExtension.d.ts index ef08eb1f07eb28737ef43fb2f075eeac8b2f2d00..43440c5094b107c3a9a357b2a9b95cd72d0948dc 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -58,7 +58,8 @@ declare namespace uiExtension { /** * Subscribes to the event indicating changes to the area where the window cannot be displayed. * - * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', indicating the event of changes to the area where the window cannot be displayed. + * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', + * indicating the event of changes to the area where the window cannot be displayed. * @param { Callback } callback - Callback used to return the avoid area information. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -73,7 +74,8 @@ declare namespace uiExtension { /** * Unsubscribes from the event indicating changes to the area where the window cannot be displayed. * - * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', indicating the event of changes to the area where the window cannot be displayed. + * @param { 'avoidAreaChange' } type - Event type. The value is fixed at 'avoidAreaChange', + * indicating the event of changes to the area where the window cannot be displayed. * @param { Callback } callback - Callback used to return the avoid area information. * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -118,7 +120,8 @@ declare namespace uiExtension { /** * Subscribes to changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). This API can be used only on 2-in-1 devices. * - * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). + * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', + * indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). * @param { 'number' } reasons - The reasons of component rect change. * @param { Callback } callback - Callback used to return the RectChangeOptions. * @throws { BusinessError } 401 - Parameter error. Possible cause: @@ -133,9 +136,11 @@ declare namespace uiExtension { on(type: 'rectChange', reasons: number, callback: Callback): void; /** - * Unsubscribes from changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). This API can be used only on 2-in-1 devices. + * Unsubscribes from changes in the position and size of the component (EmbeddedComponent or UIExtensionComponent). + * This API can be used only on 2-in-1 devices. * - * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). + * @param { 'rectChange' } type - Event type. The value is fixed at 'rectChange', + * indicating the rectangle change event for the component (EmbeddedComponent or UIExtensionComponent). * @param { Callback } callback - Callback used to return the RectChangeOptions. * @throws { BusinessError } 401 - Parameter error. Possible cause: *
1. Mandatory parameters are left unspecified. @@ -182,7 +187,6 @@ declare namespace uiExtension { *
3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300005 - This window proxy is abnormal. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @atomicservice @@ -193,7 +197,8 @@ declare namespace uiExtension { /** * Adds or deletes the watermark flag for this window. This API uses a promise to return the result. * - * @param { boolean } enable - Whether to add or delete the flag. The value true means to add the watermark flag, and false means to delete the watermark flag. + * @param { boolean } enable - Whether to add or delete the flag. The value true means to add the watermark flag, + * and false means to delete the watermark flag. * @returns { Promise } - The promise returned by the function * @throws { BusinessError } 1300002 - The UIExtension window proxy is abnormal. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -202,24 +207,25 @@ declare namespace uiExtension { * @systemapi * @since 12 */ - setWaterMarkFlag(enable: boolean): Promise; + setWaterMarkFlag(enable: boolean): Promise; - /** - * Sets the events that the component (EmbeddedComponent or UIExtensionComponent) will occupy, preventing the host from responding to these events within the component's area. - * - * @param { EventFlag } eventFlags - Type of events to occupy. For details about the available values, see {@link uiExtension.EventFlag }. - * @returns { Promise } - The promise returned by the function - * @throws { BusinessError } 401 - Parameter error. Possible cause: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 1300002 - This window state is abnormal. - * @throws { BusinessError } 1300003 - This window manager service works abnormally. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - occupyEvents(eventFlags: number): Promise; + /** + * Sets the events that the component (EmbeddedComponent or UIExtensionComponent) will occupy, + * preventing the host from responding to these events within the component's area. + * + * @param { EventFlag } eventFlags - Type of events to occupy. For details about the available values, see {@link uiExtension.EventFlag }. + * @returns { Promise } - The promise returned by the function + * @throws { BusinessError } 401 - Parameter error. Possible cause: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + occupyEvents(eventFlags: number): Promise; /** * The properties of the UIExtension window diff --git a/api/@ohos.base.d.ets b/api/@ohos.base.d.ets index 39f9d3995fd8fcee34650181e05a732a7468c206..858cd291eaf2557b120655b9cbe853593bb745ab 100644 --- a/api/@ohos.base.d.ets +++ b/api/@ohos.base.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -51,7 +51,7 @@ export type ErrorCallback = (err: T)=> void; * @atomicservice * @since 20 */ -export type AsyncCallback = (err: BusinessError, data: T)=> void; +export type AsyncCallback = (err: BusinessError | null, data: T | undefined)=> void; /** * Defines the error interface. @@ -73,8 +73,8 @@ export declare class BusinessError extends Error { constructor(); /** * A constructor used to create a BusinessError object - * @params { number } code - * @params { Error } error + * @param { number } code + * @param { Error } error * @syscap SystemCapability.Base * @crossplatform * @form @@ -84,9 +84,9 @@ export declare class BusinessError extends Error { constructor(code: number, error: Error); /** * A constructor used to create a BusinessError object - * @params { number } code - * @params { T } data - * @params { Error } error + * @param { number } code + * @param { T } data + * @param { Error } error * @syscap SystemCapability.Base * @crossplatform * @form @@ -175,3 +175,26 @@ export declare class BusinessError extends Error { */ data?: T; } + + /** + * In ArkTS static typing, for literals where the hierarchy and the number + * of attributes per level are uncertain, you can use RecordData for initialization. + * @typedef RecordData + * @syscap SystemCapability.Base + * @since 20 + * @example + * import { RecordData } from '@kit.BasicServiceKit'; + * const param: RecordData = { + * "key": { + * "a": 1 + * } + * } + * let want: Want = { + * bundleName: 'com.example.myapplication', + * abilityName: 'EntryAbility', + * parameters: param + * }; + * this.context.startAbility(want); + */ + export type RecordData = undefined | null | Object | Record | Array; + \ No newline at end of file diff --git a/api/@ohos.base.d.ts b/api/@ohos.base.d.ts index b9930a4b6fd6d393f4a13ed87f19241bed4f52da..12b9052cb6b144cee8c112b3ba7b76e4c7de60f8 100644 --- a/api/@ohos.base.d.ts +++ b/api/@ohos.base.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -84,7 +84,7 @@ export interface Callback { /** * Defines the basic error callback. - * @typedef ErrorCallback + * @typedef ErrorCallback * @syscap SystemCapability.Base * @since 6 */ diff --git a/api/@ohos.batteryInfo.d.ets b/api/@ohos.batteryInfo.d.ets index 7b8f73ca199c713d6393ca4ac983f258e4f6ca63..3476927c8922231cc625298138ace12be2af65e0 100644 --- a/api/@ohos.batteryInfo.d.ets +++ b/api/@ohos.batteryInfo.d.ets @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.2 */ /** @@ -23,19 +24,433 @@ *

Battery information includes the remaining battery power, * voltage, temperature, model, and charger type. * + * @namespace batteryInfo * @syscap SystemCapability.PowerManager.BatteryManager.Core - * @atomicservice * @since 20 */ -declare class batteryInfo { +declare namespace batteryInfo { + /** + * Sets the battery config by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @param { string } sceneValue - Indicates the battery charging scene value. + * sceneValue parameter must be of type string. + * @returns { int } Return to set the charging configuration result. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function setBatteryConfig(sceneName: string, sceneValue: string): int; + + /** + * Queries the battery config by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @returns { string } Returns the battery charging configuration, returns "" otherwise. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function getBatteryConfig(sceneName: string): string; + + /** + * Checks the battery config is enable by scene name. + * + * @param { string } sceneName - Indicates the battery charging scene name. + * sceneName parameter must be of type string. + * @returns { boolean } Returns true if the device supports the charging scene, returns false otherwise. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 5100101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function isBatteryConfigSupported(sceneName: string): boolean; + /** * Battery state of charge (SoC) of the current device, in percent. * - * @readonly + * @returns { int } Returns the battery state of charge (SoC) of the current device, in percent. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function batterySOC(): int; + + /** + * Battery charging status of the current device. + * + * @returns { BatteryChargeState } Returns the battery charging status of the current device. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function chargingStatus(): BatteryChargeState; + + /** + * Battery health state of the current device. + * + * @returns { BatteryHealthState } Returns the battery health state of the current device. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function healthStatus(): BatteryHealthState; + + /** + * Charger type of the current device. + * + * @returns { BatteryPluggedType } Returns the charger type of the current device. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function pluggedType(): BatteryPluggedType; + + /** + * Battery voltage of the current device, in µV. + * + * @returns { int } Returns the battery voltage of the current device, in µV. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function voltage(): int; + + /** + * Battery technology of the current device. + * + * @returns { string } Returns the battery technology of the current device. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function technology(): string; + + /** + * Battery temperature of the current device, in 0.1℃. + * + * @returns { int } Returns the battery temperature of the current device, in 0.1℃. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function batteryTemperature(): int; + + /** + * Battery present state of the current device. + * + * @returns { boolean } Returns true if the battery is present; returns false if the battery is absent. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function isBatteryPresent(): boolean; + + /** + * Battery capacity level of the current device. + * + * @returns { BatteryCapacityLevel } Returns the battery capacity level of the current device. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function batteryCapacityLevel(): BatteryCapacityLevel; + + /** + * Estimated remaining time for the current device to be fully charged, in ms. + * + * @returns { long } Returns the estimated remaining time for the current device to be fully charged, in ms. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function estimatedRemainingChargeTime(): long; + + /** + * Battery total energy of the current device, in mAh. + * + * @returns { int } Returns the battery total energy of the current device, in mAh. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function totalEnergy(): int; + + /** + * Battery immediate current of the current device, in mA. + * + * @returns { int } Returns the battery immediate current of the current device, in mA. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + function nowCurrent(): int; + + /** + * Battery remaining energy of the current device, in mAh. + * + * @returns { int } Returns the battery remaining energy of the current device, in mAh. + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @systemapi + * @since 20 + */ + function remainingEnergy(): int; + + /** + * Charger type of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryPluggedType { + /** + * Unknown type + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + NONE, + /** + * AC charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + AC, + /** + * USB charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + USB, + /** + * Wireless charger + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + WIRELESS + } + + /** + * Battery charging status of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryChargeState { + /** + * Unknown state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + NONE, + /** + * The battery is being charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + ENABLE, + /** + * The battery is not being charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + DISABLE, + /** + * The battery is fully charged. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + FULL + } + + /** + * Battery health status of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryHealthState { + /** + * Unknown state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + UNKNOWN, + /** + * The battery is in healthy state. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + GOOD, + /** + * The battery is overheated. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + OVERHEAT, + /** + * The battery voltage is over high. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + OVERVOLTAGE, + /** + * The battery temperature is low. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + COLD, + /** + * The battery is dead. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + DEAD + } + + /** + * Battery capacity level of a device. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + export enum BatteryCapacityLevel { + /** + * The battery is in full capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_FULL, + /** + * The battery is in high capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_HIGH, + /** + * The battery is in normal capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_NORMAL, + /** + * The battery is in low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_LOW, + /** + * The battery is in warning low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_WARNING, + /** + * The battery is in critical low capacity level. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_CRITICAL, + /** + * The battery is in the lowest capacity level, system will shut down automatically in a few seconds. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + LEVEL_SHUTDOWN + } + + /** + * Extra key of common event COMMON_EVENT_BATTERY_CHANGED. + * + * @enum { string } * @syscap SystemCapability.PowerManager.BatteryManager.Core - * @atomicservice * @since 20 */ - static get batterySOC(): int; + export enum CommonEventBatteryChangedKey { + /** + * Extra code of batterySOC. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_SOC = 'soc', + /** + * Extra code of chargingStatus. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_CHARGE_STATE = 'chargeState', + /** + * Extra code of healthStatus. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_HEALTH_STATE = 'healthState', + /** + * Extra code of pluggedType. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_PLUGGED_TYPE = 'pluggedType', + /** + * Extra code of voltage. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_VOLTAGE = 'voltage', + /** + * Extra code of technology. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_TECHNOLOGY = 'technology', + /** + * Extra code of batteryTemperature. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_TEMPERATURE = 'temperature', + /** + * Extra code of isBatteryPresent. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_PRESENT = 'present', + /** + * Extra code of batteryCapacityLevel. + * + * @syscap SystemCapability.PowerManager.BatteryManager.Core + * @since 20 + */ + EXTRA_CAPACITY_LEVEL = 'capacityLevel' + } } -export default batteryInfo; \ No newline at end of file +export default batteryInfo; diff --git a/api/@ohos.batteryStatistics.d.ts b/api/@ohos.batteryStatistics.d.ts index 906cb964535eab1548333568b9ddab2d150f235a..1ccd48e0079800170162c10930fd736c35b9700d 100644 --- a/api/@ohos.batteryStatistics.d.ts +++ b/api/@ohos.batteryStatistics.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ import { AsyncCallback, BusinessError } from './@ohos.base'; @@ -26,88 +27,108 @@ import { AsyncCallback, BusinessError } from './@ohos.base'; * @namespace batteryStats * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace batteryStats { /** * Describes the consumption type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ConsumptionType { - /** Indicates an invalid consumption type + /** + * Indicates an invalid consumption type. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_INVALID = -17, - /** Indicates the battery power consumption generated by APP + /** + * Indicates the battery power consumption generated by APP. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_APP, - /** Indicates the battery power consumption generated by bluetooth + /** + * Indicates the battery power consumption generated by bluetooth. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_BLUETOOTH, - /** Indicates the battery power consumption generated when the CPU is idle + /** + * Indicates the battery power consumption generated when the CPU is idle. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_IDLE, - /** Indicates the battery power consumption generated when phone call is active + /** + * Indicates the battery power consumption generated when phone call is active. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_PHONE, - /** Indicates the battery power consumption generated by radio + /** + * Indicates the battery power consumption generated by radio. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_RADIO, - /** Indicates the battery power consumption generated by screen + /** + * Indicates the battery power consumption generated by screen. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_SCREEN, - /** Indicates the battery power consumption generated by user + /** + * Indicates the battery power consumption generated by user. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_USER, - /** Indicates the battery power consumption generated by WIFI + /** + * Indicates the battery power consumption generated by WIFI. * * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ CONSUMPTION_TYPE_WIFI } @@ -119,7 +140,8 @@ declare namespace batteryStats { * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBatteryStats(): Promise>; @@ -133,67 +155,72 @@ declare namespace batteryStats { * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBatteryStats(callback: AsyncCallback>): void; /** * Obtains power consumption information(mAh) for a given uid. * - * @param { number } uid Indicates the uid. - * @returns { number } Power consumption information(mAh). + * @param { int } uid Indicates the uid. + * @returns { double } Power consumption information(mAh). * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getAppPowerValue(uid: number): number; + function getAppPowerValue(uid: int): double; /** * Obtains power consumption information(Percent) for a given uid. * - * @param { number } uid Indicates the uid. - * @returns { number } Power consumption information(Percent). + * @param { int } uid Indicates the uid. + * @returns { double } Power consumption information(Percent). * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getAppPowerPercent(uid: number): number; + function getAppPowerPercent(uid: int): double; /** * Obtains power consumption information(mAh) for a given type. * * @param { ConsumptionType } type Indicates the hardware type. * the ConsumptionType type is an enumeration class. - * @returns { number } Power consumption information(mAh). + * @returns { double } Power consumption information(mAh). * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getHardwareUnitPowerValue(type: ConsumptionType): number; + function getHardwareUnitPowerValue(type: ConsumptionType): double; /** * Obtains power consumption information(Percent) for a given type. * * @param { ConsumptionType } type Indicates the hardware type. * the ConsumptionType type is an enumeration class. - * @returns { number } Power consumption information(Percent). + * @returns { double } Power consumption information(Percent). * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @throws { BusinessError } 4600101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getHardwareUnitPowerPercent(type: ConsumptionType): number; + function getHardwareUnitPowerPercent(type: ConsumptionType): double; /** * Contains power consumption information of a device. @@ -202,35 +229,42 @@ declare namespace batteryStats { * @typedef BatteryStatsInfo * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface BatteryStatsInfo { - /** The uid related with the power consumption info. + /** + * The uid related with the power consumption info. * - * @type { number } + * @type { int } * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ - uid: number; + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ + uid: int; - /** The type related with the power consumption info. + /** + * The type related with the power consumption info. * * @type { ConsumptionType } * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ type: ConsumptionType; - /** The power consumption value(mAh). + /** + * The power consumption value(mAh). * - * @type { number } + * @type { double } * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 - */ - power: number; + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ + power: double; } } @@ -240,6 +274,7 @@ declare namespace batteryStats { * @namespace batteryStats * @syscap SystemCapability.PowerManager.BatteryStatistics * @systemapi - * @since 8 -*/ + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 + */ export default batteryStats; diff --git a/api/@ohos.bluetooth.a2dp.d.ts b/api/@ohos.bluetooth.a2dp.d.ts index c3eeaadd89eb837188139d1d13470bbf1386e40e..485030b7cbcc9cdad632e937a06460cfb0240e5b 100644 --- a/api/@ohos.bluetooth.a2dp.d.ts +++ b/api/@ohos.bluetooth.a2dp.d.ts @@ -34,7 +34,8 @@ import type baseProfile from './@ohos.bluetooth.baseProfile'; * @namespace a2dp * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace a2dp { /** @@ -42,7 +43,8 @@ declare namespace a2dp { * * @typedef { baseProfile.BaseProfile } BaseProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type BaseProfile = baseProfile.BaseProfile; @@ -65,7 +67,8 @@ declare namespace a2dp { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function createA2dpSrcProfile(): A2dpSourceProfile; @@ -83,7 +86,8 @@ declare namespace a2dp { * @typedef A2dpSourceProfile * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface A2dpSourceProfile extends BaseProfile { /** @@ -816,7 +820,21 @@ declare namespace a2dp { * @syscap SystemCapability.Communication.Bluetooth.Core * @since 19 */ - CODEC_BIT_RATE_ABR = 8 + CODEC_BIT_RATE_ABR = 8, + /** + * Codec bit rate 1.5M. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 21 + */ + CODEC_BIT_RATE_1500000 = 9, + /** + * Codec bit rate 2.3M. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 21 + */ + CODEC_BIT_RATE_2300000 = 10 } /** * Describes the codec frame length. diff --git a/api/@ohos.bluetooth.access.d.ts b/api/@ohos.bluetooth.access.d.ts index 15547e3fbb9e46c60ca69b7f7bde47f3dbc968b4..78753794475b946368bca2b15e5347abb8d2f35b 100644 --- a/api/@ohos.bluetooth.access.d.ts +++ b/api/@ohos.bluetooth.access.d.ts @@ -42,7 +42,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace access { /** @@ -79,7 +80,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function enableBluetooth(): void; @@ -117,10 +119,64 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function disableBluetooth(): void; + /** + * Asynchronous interface for enables Bluetooth on a device. + * + * @permission ohos.permission.ACCESS_BLUETOOTH + * @returns { Promise } Returns the promise object. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 2900001 - Service stopped. + * @throws { BusinessError } 2900013 - The user does not respond. + * @throws { BusinessError } 2900014 - User refuse the action. + * @throws { BusinessError } 2900099 - Operation failed. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + function enableBluetoothAsync(): Promise; + + /** + * Asynchronous interface for disables Bluetooth on a device. + * + * @permission ohos.permission.ACCESS_BLUETOOTH + * @returns { Promise } Returns the promise object. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 2900001 - Service stopped. + * @throws { BusinessError } 2900013 - The user does not respond. + * @throws { BusinessError } 2900014 - User refuse the action. + * @throws { BusinessError } 2900099 - Operation failed. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + function disableBluetoothAsync(): Promise; + + /** + * Notify bluetooth the result of bluetooth dialog. + * + * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH + * @param { NotifyDialogResultParams } notifyDialogResultParams - Indicates the params for dialog result. + * @returns { Promise } Returns the promise object. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 2900001 - Service stopped. + * @throws { BusinessError } 2900099 - Operation failed. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + function notifyDialogResult(notifyDialogResultParams: NotifyDialogResultParams): Promise; + /** * Restrict Bluetooth BR/EDR ability on a device. * @@ -133,7 +189,8 @@ declare namespace access { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function restrictBluetooth(): Promise; @@ -172,7 +229,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function getState(): BluetoothState; @@ -441,7 +499,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export enum BluetoothState { /** @@ -463,7 +522,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_OFF = 0, /** @@ -485,7 +545,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_ON = 1, /** @@ -507,7 +568,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ON = 2, /** @@ -529,7 +591,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_OFF = 3, /** @@ -543,7 +606,8 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_TURNING_ON = 4, /** @@ -557,7 +621,8 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_ON = 5, /** @@ -571,10 +636,60 @@ declare namespace access { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_BLE_TURNING_OFF = 6 } + + /** + * Describes the result of bluetooth dialog. + * + * @typedef NotifyDialogResultParams + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + interface NotifyDialogResultParams { + /** + * The type of bluetooth dialog. + * + * @type { DialogType } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + dialogType: DialogType; + /** + * The result of bluetooth dialog. The value true indicates that the user approves the request, + * and the value false indicates that the user rejects the request. + * + * @type { boolean } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + dialogResult: boolean; + } + + /** + * The enum of bluetooth dialog type. + * + * @enum { number } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + enum DialogType { + /** + * The type of bluetooth switch dialog. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @systemapi + * @since 20 + */ + BLUETOOTH_SWITCH = 0 + } } export default access; \ No newline at end of file diff --git a/api/@ohos.bluetooth.baseProfile.d.ts b/api/@ohos.bluetooth.baseProfile.d.ts index 5034765d55393669c5358900e8ba9a7fb31a1d0f..27764959f4c3e811cd60966ad2423b5b1c92ccbe 100644 --- a/api/@ohos.bluetooth.baseProfile.d.ts +++ b/api/@ohos.bluetooth.baseProfile.d.ts @@ -34,7 +34,8 @@ import type constant from './@ohos.bluetooth.constant'; * @namespace baseProfile * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace baseProfile { /** @@ -50,7 +51,8 @@ declare namespace baseProfile { * @typedef { constant.ProfileConnectionState } ProfileConnectionState * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ type ProfileConnectionState = constant.ProfileConnectionState; @@ -169,7 +171,8 @@ declare namespace baseProfile { * @typedef StateChangeParam * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export interface StateChangeParam { /** @@ -185,7 +188,8 @@ declare namespace baseProfile { * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -202,7 +206,8 @@ declare namespace baseProfile { * @type { ProfileConnectionState } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ state: ProfileConnectionState; @@ -237,7 +242,8 @@ declare namespace baseProfile { * @typedef BaseProfile * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BaseProfile { /** diff --git a/api/@ohos.bluetooth.ble.d.ts b/api/@ohos.bluetooth.ble.d.ts index 7ec2196b2172bbcfa3e586fb1123b84517b51803..7bd6f01bd1d2022f89aff37c46692e0c20f74fb1 100644 --- a/api/@ohos.bluetooth.ble.d.ts +++ b/api/@ohos.bluetooth.ble.d.ts @@ -43,7 +43,8 @@ import type constant from './@ohos.bluetooth.constant'; * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace ble { /** @@ -67,7 +68,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ type ProfileConnectionState = constant.ProfileConnectionState; @@ -93,7 +95,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function createGattServer(): GattServer; @@ -131,7 +134,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function createGattClientDevice(deviceId: string): GattClientDevice; @@ -276,7 +280,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function stopBLEScan(): void; @@ -394,7 +399,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function stopAdvertising(): void; @@ -954,7 +960,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface GattServer { /** @@ -1100,7 +1107,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; @@ -1797,7 +1805,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface GattClientDevice { /** @@ -1840,7 +1849,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ connect(): void; @@ -1881,7 +1891,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ disconnect(): void; @@ -1925,7 +1936,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; @@ -2878,7 +2890,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setBLEMtuSize(mtu: number): void; @@ -3466,7 +3479,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface GattService { /** @@ -3491,7 +3505,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; /** @@ -3516,7 +3531,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isPrimary: boolean; /** @@ -3541,7 +3557,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristics: Array; /** @@ -3584,7 +3601,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface BLECharacteristic { /** @@ -3609,7 +3627,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; /** @@ -3634,7 +3653,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -3659,7 +3679,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicValue: ArrayBuffer; /** @@ -3684,7 +3705,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ descriptors: Array; /** @@ -3709,7 +3731,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ properties?: GattProperties; /** @@ -3757,7 +3780,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface BLEDescriptor { /** @@ -3782,7 +3806,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; /** @@ -3807,7 +3832,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -3832,7 +3858,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ descriptorUuid: string; /** @@ -3857,7 +3884,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ descriptorValue: ArrayBuffer; /** @@ -3905,7 +3933,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface NotifyCharacteristic { /** @@ -3930,7 +3959,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; /** @@ -3955,7 +3985,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -3980,7 +4011,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicValue: ArrayBuffer; /** @@ -3998,7 +4030,8 @@ declare namespace ble { * @type { boolean } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ confirm: boolean; } @@ -4025,7 +4058,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface CharacteristicReadRequest { /** @@ -4050,7 +4084,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4075,7 +4110,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ transId: number; /** @@ -4091,7 +4127,8 @@ declare namespace ble { * @type { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; /** @@ -4116,7 +4153,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -4141,7 +4179,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; } @@ -4168,7 +4207,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface CharacteristicWriteRequest { /** @@ -4193,7 +4233,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4218,7 +4259,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ transId: number; /** @@ -4234,7 +4276,8 @@ declare namespace ble { * @type { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; /** @@ -4291,7 +4334,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ value: ArrayBuffer; /** @@ -4316,7 +4360,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -4341,7 +4386,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; } @@ -4368,7 +4414,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DescriptorReadRequest { /** @@ -4393,7 +4440,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4418,7 +4466,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ transId: number; /** @@ -4434,7 +4483,8 @@ declare namespace ble { * @type { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; /** @@ -4459,7 +4509,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ descriptorUuid: string; /** @@ -4484,7 +4535,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -4509,7 +4561,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; } @@ -4536,7 +4589,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DescriptorWriteRequest { /** @@ -4561,7 +4615,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4586,7 +4641,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ transId: number; /** @@ -4602,7 +4658,8 @@ declare namespace ble { * @type { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; /** @@ -4659,7 +4716,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ value: ArrayBuffer; /** @@ -4684,7 +4742,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ descriptorUuid: string; /** @@ -4709,7 +4768,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ characteristicUuid: string; /** @@ -4734,7 +4794,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; } @@ -4761,7 +4822,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ServerResponse { /** @@ -4786,7 +4848,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4811,7 +4874,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ transId: number; /** @@ -4836,7 +4900,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ status: number; /** @@ -4852,7 +4917,8 @@ declare namespace ble { * @type { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; /** @@ -4877,7 +4943,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ value: ArrayBuffer; } @@ -4904,7 +4971,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface BLEConnectionChangeState { /** @@ -4929,7 +4997,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -4954,9 +5023,20 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ state: ProfileConnectionState; + /** + * Reason of the disconnection of the gatt connection. + * + * @type { ?GattDisconnectReason } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + reason?: GattDisconnectReason; } /** @@ -4981,7 +5061,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScanResult { /** @@ -5006,7 +5087,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -5056,7 +5138,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ data: ArrayBuffer; /** @@ -5106,14 +5189,15 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ connectable: boolean; } /** * Describes the contents of the scan report. - * + * * @typedef ScanReport * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform @@ -5138,7 +5222,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ scanResult: Array; } @@ -5165,7 +5250,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface AdvertiseSetting { /** @@ -5185,7 +5271,8 @@ declare namespace ble { * @type { ?number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interval?: number; /** @@ -5205,7 +5292,8 @@ declare namespace ble { * @type { ?number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ txPower?: number; /** @@ -5230,7 +5318,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ connectable?: boolean; } @@ -5257,7 +5346,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface AdvertiseData { /** @@ -5282,7 +5372,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuids: Array; /** @@ -5307,7 +5398,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ manufactureData: Array; /** @@ -5332,7 +5424,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceData: Array; /** @@ -5385,7 +5478,8 @@ declare namespace ble { * @typedef AdvertisingParams * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface AdvertisingParams { /** @@ -5401,7 +5495,8 @@ declare namespace ble { * @type { AdvertiseSetting } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ advertisingSettings: AdvertiseSetting; /** @@ -5417,7 +5512,8 @@ declare namespace ble { * @type { AdvertiseData } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ advertisingData: AdvertiseData; /** @@ -5433,7 +5529,8 @@ declare namespace ble { * @type { ?AdvertiseData } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ advertisingResponse?: AdvertiseData; /** @@ -5443,7 +5540,8 @@ declare namespace ble { * * @type { ?number } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -5471,7 +5569,8 @@ declare namespace ble { * * @type { ?number } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: number; } @@ -5507,7 +5606,8 @@ declare namespace ble { * @typedef AdvertisingStateChangeInfo * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface AdvertisingStateChangeInfo { /** @@ -5539,7 +5639,8 @@ declare namespace ble { * @type { AdvertisingState } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ state: AdvertisingState; } @@ -5566,7 +5667,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManufactureData { /** @@ -5643,7 +5745,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ServiceData { /** @@ -5668,7 +5771,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid: string; /** @@ -5720,7 +5824,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScanFilter { /** @@ -5745,7 +5850,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId?: string; @@ -5797,7 +5903,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceUuid?: string; @@ -5901,7 +6008,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ serviceData?: ArrayBuffer; @@ -5979,7 +6087,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ manufactureData?: ArrayBuffer; @@ -6032,7 +6141,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScanOptions { /** @@ -6057,7 +6167,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interval?: number; /** @@ -6082,7 +6193,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ dutyMode?: ScanDuty; /** @@ -6098,7 +6210,8 @@ declare namespace ble { * @type { ?MatchMode } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ matchMode?: MatchMode; /** @@ -6153,7 +6266,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface GattProperties { /** @@ -6178,7 +6292,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ write?: boolean; /** @@ -6203,7 +6318,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ writeNoResponse?: boolean; /** @@ -6228,7 +6344,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ read?: boolean; /** @@ -6253,7 +6370,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ notify?: boolean; /** @@ -6269,7 +6387,8 @@ declare namespace ble { * @type { ?boolean } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ indicate?: boolean; @@ -6326,7 +6445,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum GattWriteType { /** @@ -6348,7 +6468,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WRITE = 1, /** @@ -6370,7 +6491,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ WRITE_NO_RESPONSE = 2 } @@ -6397,7 +6519,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum ScanDuty { /** @@ -6419,7 +6542,8 @@ declare namespace ble { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SCAN_MODE_LOW_POWER = 0, /** @@ -6481,7 +6605,8 @@ declare namespace ble { * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MatchMode { /** @@ -6495,7 +6620,8 @@ declare namespace ble { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MATCH_MODE_AGGRESSIVE = 1, /** @@ -6509,7 +6635,8 @@ declare namespace ble { * * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MATCH_MODE_STICKY = 2 } @@ -6527,7 +6654,8 @@ declare namespace ble { * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum AdvertisingState { /** @@ -6541,21 +6669,24 @@ declare namespace ble { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STARTED = 1, /** * advertising temporarily enabled. * * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ENABLED = 2, /** * advertising temporarily disabled. * * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLED = 3, /** @@ -6569,7 +6700,8 @@ declare namespace ble { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STOPPED = 4 } @@ -6628,7 +6760,7 @@ declare namespace ble { /** * Report mode used during scan. - * + * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform @@ -6713,6 +6845,58 @@ declare namespace ble { ON_BATCH = 3, } + /** + * The enum of gatt disconnection reasons. + * + * @enum { number } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + enum GattDisconnectReason { + + /** + * Disconnection due to timeout. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + CONN_TIMEOUT = 1, + + /** + * The connection is disconnected due to the peer. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + CONN_TERMINATE_PEER_USER = 2, + + /** + * The connection is disconnected due to the local host. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + CONN_TERMINATE_LOCAL_HOST = 3, + + /** + * Disconnection due to unknown reason. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @crossplatform + * @atomicservice + * @since 20 + */ + CONN_UNKNOWN = 4 + } + /** * Describes the permission of a att attribute item. * diff --git a/api/@ohos.bluetooth.connection.d.ts b/api/@ohos.bluetooth.connection.d.ts index 4436723f197650369f39c19b581c70675683c91f..4cd7019ad771958997ac46795bb2e7da73170ba3 100644 --- a/api/@ohos.bluetooth.connection.d.ts +++ b/api/@ohos.bluetooth.connection.d.ts @@ -43,7 +43,8 @@ import type constant from './@ohos.bluetooth.constant'; * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace connection { /** @@ -118,7 +119,8 @@ declare namespace connection { * @typedef { constant.MajorClass } MajorClass * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ type MajorClass = constant.MajorClass; @@ -135,7 +137,8 @@ declare namespace connection { * @typedef { constant.MajorMinorClass } MajorMinorClass * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ type MajorMinorClass = constant.MajorMinorClass; @@ -461,7 +464,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteDeviceName(deviceId: string): string; @@ -481,7 +485,8 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Failed to obtain the name or alias of the peer Bluetooth device. * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteDeviceName(deviceId: string, alias?: boolean): string; @@ -531,10 +536,25 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteDeviceClass(deviceId: string): DeviceClass; + /** + * Get the transport of the bluetooth device. + * + * @param { string } deviceId - Indicates device ID. For example, "11:22:33:AA:BB:FF". + * @returns { BluetoothTransport } The transport of bluetooth device. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 2900001 - Service stopped. + * @throws { BusinessError } 2900003 - Bluetooth disabled. + * @throws { BusinessError } 2900099 - Get transport failed. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + function getRemoteDeviceTransport(deviceId: string): BluetoothTransport; + /** * Obtains the Bluetooth local name of a device. * @@ -602,7 +622,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function getPairedDevices(): Array; @@ -748,7 +769,8 @@ declare namespace connection { * @throws { BusinessError } 2900003 - Bluetooth disabled. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function setBluetoothScanMode(mode: ScanMode, duration: number): void; @@ -1172,7 +1194,8 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteProductId(deviceId: string): string; @@ -1599,7 +1622,8 @@ declare namespace connection { * @typedef BondStateParam * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface BondStateParam { /** @@ -1615,7 +1639,8 @@ declare namespace connection { * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -1631,7 +1656,8 @@ declare namespace connection { * @type { BondState } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ state: BondState; /** @@ -1657,7 +1683,8 @@ declare namespace connection { * * @typedef PinRequiredParam * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface PinRequiredParam { /** @@ -1665,7 +1692,8 @@ declare namespace connection { * * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -1700,7 +1728,8 @@ declare namespace connection { * @typedef DeviceClass * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceClass { /** @@ -1716,7 +1745,8 @@ declare namespace connection { * @type { MajorClass } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ majorClass: MajorClass; /** @@ -1732,7 +1762,8 @@ declare namespace connection { * @type { MajorMinorClass } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ majorMinorClass: MajorMinorClass; /** @@ -1774,7 +1805,21 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @since 10 */ - TRANSPORT_LE = 1 + TRANSPORT_LE = 1, + /** + * The value of bluetooth transport DUAL. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + TRANSPORT_DUAL = 2, + /** + * The unknown bluetooth transport. + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + TRANSPORT_UNKNOWN = 3 } /** @@ -1790,7 +1835,8 @@ declare namespace connection { * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum ScanMode { /** @@ -1846,7 +1892,8 @@ declare namespace connection { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4, /** @@ -1880,7 +1927,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum BondState { /** @@ -1946,7 +1994,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ BOND_STATE_BONDED = 2 } @@ -2039,7 +2088,8 @@ declare namespace connection { * * @typedef DiscoveryResult * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface DiscoveryResult { /** @@ -2055,7 +2105,8 @@ declare namespace connection { * * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -2113,7 +2164,8 @@ declare namespace connection { * * @typedef BatteryInfo * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface BatteryInfo { /** @@ -2122,7 +2174,8 @@ declare namespace connection { * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** @@ -2370,7 +2423,8 @@ declare namespace connection { * @type { string } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; /** diff --git a/api/@ohos.bluetooth.constant.d.ts b/api/@ohos.bluetooth.constant.d.ts index 5d460b0103a3fc8dd7d08ef5d60ff8878c0d1cdb..2f6a671b02713dbe273184c4ca74eb99f29ce29a 100644 --- a/api/@ohos.bluetooth.constant.d.ts +++ b/api/@ohos.bluetooth.constant.d.ts @@ -40,7 +40,8 @@ * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace constant { /** @@ -364,7 +365,8 @@ declare namespace constant { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ProfileConnectionState { /** @@ -386,7 +388,8 @@ declare namespace constant { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_DISCONNECTED = 0, /** @@ -430,7 +433,8 @@ declare namespace constant { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_CONNECTED = 2, /** @@ -470,7 +474,8 @@ declare namespace constant { * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export enum MajorClass { /** @@ -491,7 +496,8 @@ declare namespace constant { * Mobile phone. * * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ MAJOR_PHONE = 0x0200, /** @@ -512,7 +518,8 @@ declare namespace constant { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ MAJOR_AUDIO_VIDEO = 0x0400, /** @@ -561,7 +568,8 @@ declare namespace constant { * Unclassified device. * * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ MAJOR_UNCATEGORIZED = 0x1F00 } @@ -579,7 +587,8 @@ declare namespace constant { * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ export enum MajorMinorClass { /** @@ -850,7 +859,8 @@ declare namespace constant { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_VIDEO_WEARABLE_HEADSET = 0x0404, /** @@ -892,7 +902,8 @@ declare namespace constant { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_VIDEO_LOUDSPEAKER = 0x0414, /** @@ -906,7 +917,8 @@ declare namespace constant { * * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_VIDEO_HEADPHONES = 0x0418, /** diff --git a/api/@ohos.bluetooth.hfp.d.ts b/api/@ohos.bluetooth.hfp.d.ts index f9c60496319bcbfcd8005a1b058563e83b5877ed..53e4c633c3d7edf20edccbf303ff0fbb73146a75 100644 --- a/api/@ohos.bluetooth.hfp.d.ts +++ b/api/@ohos.bluetooth.hfp.d.ts @@ -25,7 +25,8 @@ import type baseProfile from './@ohos.bluetooth.baseProfile'; * * @namespace hfp * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hfp { /** @@ -33,7 +34,8 @@ declare namespace hfp { * * @typedef { baseProfile.BaseProfile } BaseProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type BaseProfile = baseProfile.BaseProfile; @@ -45,7 +47,8 @@ declare namespace hfp { *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createHfpAgProfile(): HandsFreeAudioGatewayProfile; @@ -55,7 +58,8 @@ declare namespace hfp { * @extends BaseProfile * @typedef HandsFreeAudioGatewayProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface HandsFreeAudioGatewayProfile extends BaseProfile { /** diff --git a/api/@ohos.bluetooth.hid.d.ts b/api/@ohos.bluetooth.hid.d.ts index 317f129d415e1b61142ce60e903f7bbedd20751c..7375d037445efd9c4115eb0dc9e266d4c435b89f 100644 --- a/api/@ohos.bluetooth.hid.d.ts +++ b/api/@ohos.bluetooth.hid.d.ts @@ -25,7 +25,8 @@ import type baseProfile from './@ohos.bluetooth.baseProfile'; * * @namespace hid * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hid { /** @@ -33,7 +34,8 @@ declare namespace hid { * * @typedef { baseProfile.BaseProfile } BaseProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type BaseProfile = baseProfile.BaseProfile; @@ -45,7 +47,8 @@ declare namespace hid { *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createHidHostProfile(): HidHostProfile; @@ -55,7 +58,8 @@ declare namespace hid { * @extends BaseProfile * @typedef HidHostProfile * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface HidHostProfile extends BaseProfile { /** diff --git a/api/@ohos.bluetooth.socket.d.ts b/api/@ohos.bluetooth.socket.d.ts index c44b7866c50850a33e3ba15ee5640f0d51e31c26..6c8a7e1a40ea1024a43acb2d7cff807c37f384b2 100644 --- a/api/@ohos.bluetooth.socket.d.ts +++ b/api/@ohos.bluetooth.socket.d.ts @@ -48,6 +48,15 @@ declare namespace socket { */ function sppListen(name: string, options: SppOptions, callback: AsyncCallback): void; + /** + * Get l2cap socket psm. + * + * @param { number } serverSocket - Indicates the server socket ID, returned by {@link sppListen}. + * @returns { number } Returns the l2cap socket psm + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + function getL2capPsm(serverSocket: number): number; /** * Waits for a remote device to connect. * @@ -231,6 +240,14 @@ declare namespace socket { * @since 10 */ type: SppType; + /** + * l2cap protocol service multiplexer + * + * @type { ?number } + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + psm?: number; } /** @@ -247,7 +264,21 @@ declare namespace socket { * @syscap SystemCapability.Communication.Bluetooth.Core * @since 10 */ - SPP_RFCOMM + SPP_RFCOMM = 0, + /** + * L2CAP of the BR type + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + SPP_L2CAP = 1, + /** + * L2CAP of the BLE type + * + * @syscap SystemCapability.Communication.Bluetooth.Core + * @since 20 + */ + SPP_L2CAP_BLE = 2 } } diff --git a/api/@ohos.brightness.d.ts b/api/@ohos.brightness.d.ts index 9b8807e0b0d7413d60670c8fa88649f1676e6440..1545fa73d8734861e1f94922cc7bb222e3d73a59 100644 --- a/api/@ohos.brightness.d.ts +++ b/api/@ohos.brightness.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ import { BusinessError } from './@ohos.base'; @@ -26,29 +27,29 @@ import { BusinessError } from './@ohos.base'; * @namespace brightness * @syscap SystemCapability.PowerManager.DisplayPowerManager * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} */ declare namespace brightness { /** * Sets the screen brightness. * - * @param { number } value Brightness value, ranging from 0 to 255. - * value parameter must be of type number. + * @param { int } value Brightness value, ranging from 0 to 255. + * value parameter must be of type int. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; * 2. Incorrect parameter types; * @throws { BusinessError } 4700101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.DisplayPowerManager * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} */ - function setValue(value: number): void; + function setValue(value: int): void; /** * Sets the screen brightness. * - * @param { number } value - Brightness value, ranging from 0 to 255. - * value parameter must be of type number. + * @param { int } value - Brightness value, ranging from 0 to 255. + * value parameter must be of type int. * @param { boolean } continuous - This parameter is used in the scenario of continuous adjustment to the brightness. * You are advised to set this parameter to true during the continuous adjustment and * to false at the end of the continuous adjustment for better performance. @@ -59,8 +60,8 @@ declare namespace brightness { * @throws { BusinessError } 4700101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.DisplayPowerManager * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} */ - function setValue(value: number, continuous: boolean): void; + function setValue(value: int, continuous: boolean): void; } export default brightness; diff --git a/api/@ohos.buffer.d.ts b/api/@ohos.buffer.d.ts index f771c071941cf481a44dc682811dd90f418e77de..38dc61329d2c165fd8c4f3807c43519258531e2f 100644 --- a/api/@ohos.buffer.d.ts +++ b/api/@ohos.buffer.d.ts @@ -1888,7 +1888,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as a big-endian, * two's complement signed value that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1903,7 +1904,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as a big-endian, * two's complement signed value that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1936,7 +1938,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset and interprets the result as a little-endian, * two's complement signed value that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1951,7 +1954,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset and interprets the result as a little-endian, * two's complement signed value that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -2164,7 +2168,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as an unsigned, * big-endian integer that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -2179,7 +2184,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as an unsigned, * big-endian integer that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -2212,7 +2218,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as an unsigned, * little-endian integer that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -2227,7 +2234,8 @@ declare namespace buffer { * Reads the specified number of bytes from this Buffer instance at the specified offset, and interprets the result as an unsigned, * little-endian integer that supports up to 48 bits of precision. * - * @param { number } offset - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to read data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to read. The value range is [1, 6]. * @returns { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3124,7 +3132,8 @@ declare namespace buffer { * Writes a big-endian signed value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3139,7 +3148,8 @@ declare namespace buffer { * Writes a big-endian signed value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3172,7 +3182,8 @@ declare namespace buffer { * Writes a little-endian signed value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. + * The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3187,7 +3198,8 @@ declare namespace buffer { * Writes a little-endian signed value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3460,7 +3472,8 @@ declare namespace buffer { * Writes an unsigned big-endian value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3475,7 +3488,8 @@ declare namespace buffer { * Writes an unsigned big-endian value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3508,7 +3522,8 @@ declare namespace buffer { * Writes an unsigned little-endian value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -3523,7 +3538,8 @@ declare namespace buffer { * Writes an unsigned little-endian value of the specified length to this Buffer instance at the specified offset. * * @param { number } value - Data to write. - * @param { number } offset - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - byteLength]. + * @param { number } offset - Number of bytes to skip before starting to write data. + * The default value is 0. The value range is [0, Buffer.length - byteLength]. * @param { number } byteLength - Number of bytes to write. * @returns { number } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: diff --git a/api/@ohos.bundle.appDomainVerify.d.ts b/api/@ohos.bundle.appDomainVerify.d.ts index 972f9cfab2c3a8f0bcb9831017df1c9a31288cea..a28a83468c6cf261fb4f138e83cc7fa9b57090ad 100644 --- a/api/@ohos.bundle.appDomainVerify.d.ts +++ b/api/@ohos.bundle.appDomainVerify.d.ts @@ -13,7 +13,8 @@ * @syscap SystemCapability.BundleManager.AppDomainVerify * @systemapi * @stagemodelonly - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace appDomainVerify { @@ -30,7 +31,8 @@ declare namespace appDomainVerify { * @syscap SystemCapability.BundleManager.AppDomainVerify * @systemapi * @stagemodelonly - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function queryAssociatedDomains(bundleName: string): string[]; @@ -46,7 +48,8 @@ declare namespace appDomainVerify { * @syscap SystemCapability.BundleManager.AppDomainVerify * @systemapi * @stagemodelonly - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function queryAssociatedBundleNames(domain: string): string[]; } diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 1e26e7c6bb27da32d7d20b8c37c71e9bf425a6b8..3e0f3fa462b6167958df315e502db4be6732c97d 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -21,6 +21,7 @@ import { AsyncCallback } from './@ohos.base'; import { Metadata as _Metadata } from './bundleManager/Metadata'; import { ElementName as _ElementName } from './bundleManager/ElementName'; +import Want from './@ohos.app.ability.Want'; /*** if arkts 1.1 */ import type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; @@ -28,7 +29,6 @@ import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef'; import { PluginBundleInfo as _PluginBundleInfo, PluginModuleInfo as _PluginModuleInfo} from './bundleManager/PluginBundleInfo'; import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo'; import type { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo'; -import Want from './@ohos.app.ability.Want'; import * as _AbilityInfo from './bundleManager/AbilityInfo'; import * as _AppProvisionInfo from './bundleManager/AppProvisionInfo'; import * as _BundleInfo from './bundleManager/BundleInfo'; @@ -397,7 +397,7 @@ declare namespace bundleManager { GET_BUNDLE_INFO_ONLY_WITH_LAUNCHER_ABILITY = 0x00001000, /** * Used to obtain the bundle information of an application installed by any user. - * It must be used together with GET_BUNDLE_INFO_WITH_APPLICATION. + * It must be used together with GET_BUNDLE_INFO_WITH_APPLICATION. * It is valid only in the {@link getBundleInfo} and {@link getAllBundleInfo} APIs. * * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -416,6 +416,16 @@ declare namespace bundleManager { * @arkts 1.1&1.2 */ GET_BUNDLE_INFO_EXCLUDE_CLONE = 0x00004000, + /** + * Used to return applications that enable cloud file sync or cloud structured data sync. + * Only effective on {@link getAllBundleInfo} + * + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + GET_BUNDLE_INFO_WITH_CLOUD_KIT = 0x00008000, } /** @@ -704,8 +714,7 @@ declare namespace bundleManager { * Indicates extension info with type of form * * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ /** * Indicates extension info with type of form @@ -970,16 +979,6 @@ declare namespace bundleManager { */ LIVE_FORM = 30, - /** - * Indicates extension info with type of selection. - * This type of extension can access data such as text selected by the user. - * - * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 20 - * @arkts 1.1&1.2 - */ - SELECTION = 31, - /** * Indicates extension info with type of unspecified * @@ -2191,7 +2190,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getApplicationInfo(bundleName: string, appFlags: number, callback: AsyncCallback): void; @@ -2211,7 +2211,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getApplicationInfo(bundleName: string, appFlags: number, userId: number, callback: AsyncCallback): void; @@ -2232,7 +2233,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getApplicationInfo(bundleName: string, appFlags: number, userId?: number): Promise; @@ -2247,7 +2249,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleInfo(bundleFlags: number, callback: AsyncCallback>): void; @@ -2264,7 +2267,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleInfo(bundleFlags: number, userId: number, callback: AsyncCallback>): void; @@ -2281,7 +2285,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleInfo(bundleFlags: number, userId?: number): Promise>; @@ -2296,7 +2301,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllApplicationInfo(appFlags: number, callback: AsyncCallback>): void; @@ -2313,7 +2319,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllApplicationInfo(appFlags: number, userId: number, callback: AsyncCallback>): void; @@ -2331,7 +2338,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllApplicationInfo(appFlags: number, userId?: number): Promise>; @@ -2352,7 +2360,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryAbilityInfo(want: Want, abilityFlags: number, callback: AsyncCallback>): void; @@ -2375,7 +2384,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryAbilityInfo(want: Want, abilityFlags: number, userId: number, callback: AsyncCallback>): void; @@ -2399,7 +2409,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryAbilityInfo(want: Want, abilityFlags: number, userId?: number): Promise>; @@ -2422,7 +2433,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryAbilityInfo(wants: Array, abilityFlags: number, userId?: number): Promise>; @@ -2445,7 +2457,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryAbilityInfoSync(want: Want, abilityFlags: number, userId?: number): Array; @@ -2453,7 +2466,7 @@ declare namespace bundleManager { * Get AbilityInfo by the given uri. * * @permission ohos.permission.GET_ABILITY_INFO - * @param { string } uri - Indicates the uri used for matching ability. + * @param { string } uri - Indicates the uri used for matching ability. The value is the same as that of the uris field under skills in the module.json5 file. * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. * @returns { Promise> } Returns a list of AbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. @@ -2482,7 +2495,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, callback: AsyncCallback>): void; @@ -2507,7 +2521,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, userId: number, callback: AsyncCallback>): void; @@ -2532,7 +2547,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, userId?: number): Promise>; @@ -2557,7 +2573,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: ExtensionAbilityType, extensionAbilityFlags: number, userId?: number): Array; @@ -2582,7 +2599,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: string, extensionAbilityFlags: number, userId?: number): Array; @@ -2604,7 +2622,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified userId is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryExtensionAbilityInfoSync(extensionAbilityType: string, extensionAbilityFlags: number, userId?: number): Array; @@ -2619,7 +2638,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 17700021 - The uid is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleNameByUid(uid: number, callback: AsyncCallback): void; @@ -2633,7 +2653,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 17700021 - The uid is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleNameByUid(uid: number): Promise; @@ -2647,7 +2668,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 17700021 - The uid is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleNameByUidSync(uid: number): string; @@ -2758,6 +2780,17 @@ declare namespace bundleManager { */ function cleanBundleCacheFiles(bundleName: string, appIndex: number): Promise; + /** + * Clears cache data of the current application. + * + * @returns { Promise } Clean bundle cache files result. + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + function cleanBundleCacheFilesForSelf(): Promise; + /** * Get the all bundle cache size of the current user. * @@ -2799,7 +2832,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function setApplicationEnabled(bundleName: string, appIndex: number, isEnabled: boolean): Promise; @@ -2816,7 +2850,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCallback): void; @@ -2833,7 +2868,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise; @@ -2849,7 +2885,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setApplicationEnabledSync(bundleName: string, isEnabled: boolean): void; @@ -2869,7 +2906,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAbilityEnabled(info: AbilityInfo, appIndex: number, isEnabled: boolean): Promise; @@ -2887,7 +2925,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean, callback: AsyncCallback): void; @@ -2905,7 +2944,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean): Promise; @@ -2922,7 +2962,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAbilityEnabledSync(info: AbilityInfo, isEnabled: boolean): void; @@ -2938,7 +2979,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isApplicationEnabled(bundleName: string, appIndex: number): Promise; @@ -2952,7 +2994,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void; @@ -2966,7 +3009,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isApplicationEnabled(bundleName: string): Promise; @@ -2998,7 +3042,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isAbilityEnabled(info: AbilityInfo, appIndex: number): Promise; @@ -3013,7 +3058,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback): void; @@ -3028,7 +3074,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isAbilityEnabled(info: AbilityInfo): Promise; @@ -3043,7 +3090,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700003 - The specified abilityName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function isAbilityEnabledSync(info: AbilityInfo): boolean; @@ -3064,7 +3112,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallback): void; @@ -3083,7 +3132,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void; @@ -3104,7 +3154,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLaunchWantForBundle(bundleName: string, userId?: number): Promise; @@ -3125,7 +3176,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLaunchWantForBundleSync(bundleName: string, userId?: number): Want; @@ -3401,7 +3453,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; @@ -3424,7 +3477,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise; @@ -3447,7 +3501,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAbilityLabelSync(bundleName: string, moduleName: string, abilityName: string): string; @@ -3675,7 +3730,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSpecifiedDistributionType(bundleName: string): string; @@ -3789,6 +3845,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function enableDynamicIcon(bundleName: string, moduleName: string): Promise; @@ -3871,7 +3928,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700306 - Failed to obtain the dynamic icon. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDynamicIcon(bundleName: string): Promise; @@ -4150,7 +4208,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAppCloneBundleInfo(bundleName: string, appIndex: number, bundleFlags: number, userId?: number): Promise; @@ -4184,7 +4243,8 @@ declare namespace bundleManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 17700021 - The uid is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAppCloneIdentity(uid: number): Promise; @@ -4207,7 +4267,7 @@ declare namespace bundleManager { /** * Migrate files from the source paths to the destination path. - * + * * @permission ohos.permission.MIGRATE_DATA * @param { Array } sourcePaths - Indicates the source paths to be migrated. * @param { string } destinationPath - Target path for data migration. diff --git a/api/@ohos.bundle.bundleMonitor.d.ts b/api/@ohos.bundle.bundleMonitor.d.ts index 8e63401b2695b4ac97055b2e17d627c6c3e90621..a9f1ed5e4f025ca52092b3b0cbbba04e9367d453 100644 --- a/api/@ohos.bundle.bundleMonitor.d.ts +++ b/api/@ohos.bundle.bundleMonitor.d.ts @@ -26,7 +26,8 @@ import { Callback } from './@ohos.base'; * @namespace bundleMonitor * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace bundleMonitor { /** @@ -35,7 +36,8 @@ declare namespace bundleMonitor { * @typedef BundleChangedInfo * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface BundleChangedInfo { /** @@ -45,7 +47,8 @@ declare namespace bundleMonitor { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; /** @@ -55,7 +58,8 @@ declare namespace bundleMonitor { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly userId: number; /** @@ -65,7 +69,8 @@ declare namespace bundleMonitor { * @readonly * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly appIndex: number; } @@ -76,7 +81,8 @@ declare namespace bundleMonitor { * @typedef { 'add' | 'update' | 'remove' } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ type BundleChangedEvent = 'add' | 'update' | 'remove'; @@ -91,7 +97,8 @@ declare namespace bundleMonitor { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: BundleChangedEvent, callback: Callback): void; @@ -106,7 +113,8 @@ declare namespace bundleMonitor { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: BundleChangedEvent, callback?: Callback): void; } diff --git a/api/@ohos.bundle.bundleResourceManager.d.ts b/api/@ohos.bundle.bundleResourceManager.d.ts index a4b4608c5db19a5047adece86db434d667b6d033..6e9a2cede7688b00fda62e802a58c739bc63fa8a 100644 --- a/api/@ohos.bundle.bundleResourceManager.d.ts +++ b/api/@ohos.bundle.bundleResourceManager.d.ts @@ -19,12 +19,16 @@ */ /*** if arkts 1.1 */ +import bundleManager from './@ohos.bundle.bundleManager'; import type { AsyncCallback } from './@ohos.base'; import type { BundleResourceInfo as _BundleResourceInfo } from './bundleManager/BundleResourceInfo'; import type { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from './bundleManager/LauncherAbilityResourceInfo'; /*** endif */ /*** if arkts 1.2 */ +import bundleManager from './@ohos.bundle.bundleManager'; +import { AsyncCallback } from './@ohos.base'; import { BundleResourceInfo as _BundleResourceInfo } from './bundleManager/BundleResourceInfo'; +import { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from './bundleManager/LauncherAbilityResourceInfo'; /*** endif */ /** @@ -101,6 +105,7 @@ declare namespace bundleResourceManager { /** * Used to obtain only main ability resource. + * Only effective on {@link getLauncherAbilityResourceInfo} and {@link getAllLauncherAbilityResourceInfo} * * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi @@ -123,7 +128,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleResourceInfo(bundleName: string, resourceFlags?: number): BundleResourceInfo; @@ -160,7 +166,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 17700001 - The specified bundleName is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: number): Array; @@ -180,7 +187,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range or not found. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: number, appIndex?: number): Array; @@ -195,7 +203,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleResourceInfo(resourceFlags: number, callback: AsyncCallback>): void; @@ -210,7 +219,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleResourceInfo(resourceFlags: number): Promise>; @@ -225,7 +235,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllLauncherAbilityResourceInfo(resourceFlags: number, callback: AsyncCallback>): void; @@ -240,7 +251,8 @@ declare namespace bundleResourceManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllLauncherAbilityResourceInfo(resourceFlags: number): Promise>; @@ -282,7 +294,8 @@ declare namespace bundleResourceManager { * @typedef { _LauncherAbilityResourceInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type LauncherAbilityResourceInfo = _LauncherAbilityResourceInfo; } diff --git a/api/@ohos.bundle.freeInstall.d.ts b/api/@ohos.bundle.freeInstall.d.ts index 1a2aae8686d3ed7fd5d7621b03e5b783f7862dce..a156bc3015f1c7f48abd3b21740b3d7a72a65a83 100644 --- a/api/@ohos.bundle.freeInstall.d.ts +++ b/api/@ohos.bundle.freeInstall.d.ts @@ -20,7 +20,15 @@ import { AsyncCallback } from './@ohos.base'; import { DispatchInfo as _DispatchInfo } from './bundleManager/DispatchInfo'; +/*** if arkts 1.1 */ import * as _PackInfo from './bundleManager/BundlePackInfo'; +/*** endif */ +/*** if arkts 1.2 */ +import { BundlePackInfo as _BundlePackInfo, PackageConfig as _PackageConfig, PackageSummary as _PackageSummary, + BundleConfigInfo as _BundleConfigInfo, ExtensionAbility as _ExtensionAbility, ModuleConfigInfo as _ModuleConfigInfo, + ModuleDistroInfo as _ModuleDistroInfo, ModuleAbilityInfo as _ModuleAbilityInfo, AbilityFormInfo as _AbilityFormInfo, + Version as _Version, ApiVersion as _ApiVersion } from './bundleManager/BundlePackInfo'; +/*** endif */ /** * Free install bundle manager. @@ -28,7 +36,8 @@ import * as _PackInfo from './bundleManager/BundlePackInfo'; * @namespace freeInstall * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace freeInstall { /** @@ -37,7 +46,8 @@ declare namespace freeInstall { * @enum { number } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum UpgradeFlag { /** @@ -45,7 +55,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ NOT_UPGRADE = 0, /** @@ -53,7 +64,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE_UPGRADE = 1, /** @@ -61,7 +73,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ RELATION_UPGRADE = 2 } @@ -73,7 +86,8 @@ declare namespace freeInstall { * @enum { number } * @syscap SystemCapability.BundleManager.BundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum BundlePackFlag { /** @@ -81,7 +95,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GET_PACK_INFO_ALL = 0x00000000, /** @@ -89,7 +104,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GET_PACKAGES = 0x00000001, /** @@ -97,7 +113,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GET_BUNDLE_SUMMARY = 0x00000002, /** @@ -105,7 +122,8 @@ declare namespace freeInstall { * * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ GET_MODULE_SUMMARY = 0x00000004 } @@ -126,7 +144,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700002 - The specified module name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback): void; @@ -147,7 +166,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700002 - The specified module name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise; @@ -167,7 +187,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700002 - The specified module name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback): void; @@ -186,7 +207,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700002 - The specified module name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isHapModuleRemovable(bundleName: string, moduleName: string): Promise; @@ -204,7 +226,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundlePackInfo(bundleName: string, bundlePackFlag: BundlePackFlag, callback: AsyncCallback): void; @@ -223,7 +246,8 @@ declare namespace freeInstall { * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundlePackInfo(bundleName: string, bundlePackFlag: BundlePackFlag): Promise; @@ -237,7 +261,8 @@ declare namespace freeInstall { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDispatchInfo(callback: AsyncCallback): void; @@ -251,7 +276,8 @@ declare namespace freeInstall { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDispatchInfo(): Promise; @@ -261,7 +287,8 @@ declare namespace freeInstall { * @typedef { _DispatchInfo } * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type DispatchInfo = _DispatchInfo; @@ -275,6 +302,17 @@ declare namespace freeInstall { */ export type BundlePackInfo = _PackInfo.BundlePackInfo; + /** + * The bundle pack info class. + * + * @typedef { _BundlePackInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type BundlePackInfo = _BundlePackInfo; + /** * The package info class. * @@ -285,6 +323,17 @@ declare namespace freeInstall { */ export type PackageConfig = _PackInfo.PackageConfig; + /** + * The package info class. + * + * @typedef { _PackageConfig } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type PackageConfig = _PackageConfig; + /** * The package summary class. * @@ -295,6 +344,17 @@ declare namespace freeInstall { */ export type PackageSummary = _PackInfo.PackageSummary; + /** + * The package summary class. + * + * @typedef { _PackageSummary } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type PackageSummary = _PackageSummary; + /** * The bundle summary class. * @@ -305,6 +365,17 @@ declare namespace freeInstall { */ export type BundleConfigInfo = _PackInfo.BundleConfigInfo; + /** + * The bundle summary class. + * + * @typedef { _BundleConfigInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type BundleConfigInfo = _BundleConfigInfo; + /** * The extension ability forms class. * @@ -315,6 +386,17 @@ declare namespace freeInstall { */ export type ExtensionAbility = _PackInfo.ExtensionAbility; + /** + * The extension ability forms class. + * + * @typedef { _ExtensionAbility } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type ExtensionAbility = _ExtensionAbility; + /** * The module summary of a bundle. * @@ -325,6 +407,17 @@ declare namespace freeInstall { */ export type ModuleConfigInfo = _PackInfo.ModuleConfigInfo; + /** + * The module summary of a bundle. + * + * @typedef { _ModuleConfigInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type ModuleConfigInfo = _ModuleConfigInfo; + /** * The bundle info summary class. * @@ -335,6 +428,17 @@ declare namespace freeInstall { */ export type ModuleDistroInfo = _PackInfo.ModuleDistroInfo; + /** + * The bundle info summary class. + * + * @typedef { _ModuleDistroInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type ModuleDistroInfo = _ModuleDistroInfo; + /** * The ability info of a module. * @@ -345,6 +449,17 @@ declare namespace freeInstall { */ export type ModuleAbilityInfo = _PackInfo.ModuleAbilityInfo; + /** + * The ability info of a module. + * + * @typedef { _ModuleAbilityInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type ModuleAbilityInfo = _ModuleAbilityInfo; + /** * The form info of an ability. * @@ -355,6 +470,17 @@ declare namespace freeInstall { */ export type AbilityFormInfo = _PackInfo.AbilityFormInfo; + /** + * The form info of an ability. + * + * @typedef { _AbilityFormInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AbilityFormInfo = _AbilityFormInfo; + /** * The bundle version class. * @@ -365,6 +491,17 @@ declare namespace freeInstall { */ export type Version = _PackInfo.Version; + /** + * The bundle version class. + * + * @typedef { _Version } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type Version = _Version; + /** * The bundle Api version class. * @@ -374,6 +511,17 @@ declare namespace freeInstall { * @since 9 */ export type ApiVersion = _PackInfo.ApiVersion; + + /** + * The bundle Api version class. + * + * @typedef { _ApiVersion } + * @syscap SystemCapability.BundleManager.BundleFramework.FreeInstall + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type ApiVersion = _ApiVersion; } export default freeInstall; diff --git a/api/@ohos.bundle.installer.d.ts b/api/@ohos.bundle.installer.d.ts index 6f0fc7461faa38eb547fad67df3bd431f2bcaddb..d4a84c9feb2185b97956be4c55217d329e0afa64 100644 --- a/api/@ohos.bundle.installer.d.ts +++ b/api/@ohos.bundle.installer.d.ts @@ -26,7 +26,8 @@ import { AsyncCallback } from './@ohos.base'; * @namespace installer * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace installer { /** @@ -37,7 +38,8 @@ declare namespace installer { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleInstaller(callback: AsyncCallback): void; @@ -48,7 +50,8 @@ declare namespace installer { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleInstaller(): Promise; @@ -59,7 +62,8 @@ declare namespace installer { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getBundleInstallerSync(): BundleInstaller; @@ -69,7 +73,8 @@ declare namespace installer { * @interface BundleInstaller * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface BundleInstaller { /** @@ -363,7 +368,8 @@ declare namespace installer { * @throws { BusinessError } 17700077 - Failed to install the HAP and restore to preinstalled bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ install(hapFilePaths: Array, installParam: InstallParam, callback: AsyncCallback): void; @@ -640,7 +646,8 @@ declare namespace installer { * @throws { BusinessError } 17700077 - Failed to install the HAP and restore to preinstalled bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ install(hapFilePaths: Array, callback: AsyncCallback): void; @@ -935,7 +942,8 @@ declare namespace installer { * @throws { BusinessError } 17700077 - Failed to install the HAP and restore to preinstalled bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ install(hapFilePaths: Array, installParam?: InstallParam): Promise; @@ -1019,7 +1027,8 @@ declare namespace installer { * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback): void; @@ -1075,7 +1084,8 @@ declare namespace installer { * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstall(bundleName: string, callback: AsyncCallback): void; @@ -1159,7 +1169,8 @@ declare namespace installer { * @throws { BusinessError } 17700067 - Failed to uninstall the HAP because uninstalling the native package failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstall(bundleName: string, installParam?: InstallParam): Promise; @@ -1215,7 +1226,8 @@ declare namespace installer { *
bundle name but different signature information exists on the device. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback): void; @@ -1265,7 +1277,8 @@ declare namespace installer { *
bundle name but different signature information exists on the device. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ recover(bundleName: string, callback: AsyncCallback): void; @@ -1321,7 +1334,8 @@ declare namespace installer { *
bundle name but different signature information exists on the device. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ recover(bundleName: string, installParam?: InstallParam): Promise; @@ -1339,7 +1353,8 @@ declare namespace installer { * @throws { BusinessError } 17700038 - The specified shared bundle does not exist. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstall(uninstallParam: UninstallParam, callback: AsyncCallback): void; @@ -1357,7 +1372,8 @@ declare namespace installer { * @throws { BusinessError } 17700038 - The specified shared bundle does not exist. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstall(uninstallParam: UninstallParam): Promise; @@ -1429,7 +1445,8 @@ declare namespace installer { * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updateBundleForSelf(hapFilePaths: Array, installParam: InstallParam, callback: AsyncCallback): void; @@ -1493,7 +1510,8 @@ declare namespace installer { * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updateBundleForSelf(hapFilePaths: Array, callback: AsyncCallback): void; @@ -1565,7 +1583,8 @@ declare namespace installer { * @throws { BusinessError } 17700051 - Failed to install the HAP because the distribution type of caller application is not enterprise_mdm. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updateBundleForSelf(hapFilePaths: Array, installParam?: InstallParam): Promise; @@ -1605,7 +1624,8 @@ declare namespace installer { *
bundle name but different signature information exists on the device. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise; @@ -1623,7 +1643,8 @@ declare namespace installer { * @throws { BusinessError } 17700301 - AddExtResource failed due to parse file failed. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ addExtResource(bundleName: string, filePaths: Array): Promise; @@ -1641,7 +1662,8 @@ declare namespace installer { * @throws { BusinessError } 17700302 - RemoveExtResource failed due to module does not exist. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ removeExtResource(bundleName: string, moduleNames: Array): Promise; @@ -1661,7 +1683,8 @@ declare namespace installer { * @throws { BusinessError } 17700069 - The app does not support the creation of an appClone instance. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise; @@ -1706,6 +1729,27 @@ declare namespace installer { */ destroyAppClone(bundleName: string, appIndex: number, destroyAppCloneParam?: DestroyAppCloneParam): Promise; + /** + * Destroy clone instance for an application. + * + * @permission ohos.permission.UNINSTALL_CLONE_BUNDLE + * @param { string } bundleName - Indicates the bundleName of clone app. + * @param { number } appIndex - Indicates the clone application's index. + * @param { number | DestroyAppCloneParam } [options] - Indicates other parameters required for the uninstallation. + * @returns { Promise } + * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.UNINSTALL_CLONE_BUNDLE'. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 17700001 - The specified bundleName cannot be found or the bundle is not installed by the specified user. + * @throws { BusinessError } 17700004 - The userId is invalid. + * @throws { BusinessError } 17700061 - AppIndex not in valid range. + * @throws { BusinessError } 17700062 - Failed to uninstall the app because the app is locked. + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + destroyAppClone(bundleName: string, appIndex: number, options?: number | DestroyAppCloneParam): Promise; + /** * Install application by bundle name with specified user. * @@ -1740,7 +1784,8 @@ declare namespace installer { *
from being installed on this device or by specified users. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ installPreexistingApp(bundleName: string, userId?: number): Promise; @@ -1773,7 +1818,8 @@ declare namespace installer { * @throws { BusinessError } 17700091 - Failed to install the plugin because the plugin name is same as host bundle name. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ installPlugin(hostBundleName: string, pluginFilePaths: Array, pluginParam?: PluginParam): Promise; @@ -1792,7 +1838,8 @@ declare namespace installer { * @throws { BusinessError } 17700092 - Failed to uninstall the plugin because the specified plugin is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstallPlugin(hostBundleName: string, pluginBundleName: string, pluginParam?: PluginParam): Promise; } @@ -1803,7 +1850,8 @@ declare namespace installer { * @typedef HashParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface HashParam { /** @@ -1812,7 +1860,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -1822,7 +1871,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ hashValue: string; } @@ -1866,7 +1916,8 @@ declare namespace installer { * @typedef PGOParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PGOParam { /** @@ -1875,7 +1926,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -1885,7 +1937,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ pgoFilePath: string; } @@ -1896,7 +1949,8 @@ declare namespace installer { * @typedef Parameters * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Parameters { /** @@ -1905,7 +1959,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; @@ -1915,7 +1970,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -1926,7 +1982,8 @@ declare namespace installer { * @typedef InstallParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface InstallParam { /** @@ -1935,7 +1992,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ userId?: number; @@ -1945,7 +2003,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ installFlag?: number; @@ -1955,7 +2014,8 @@ declare namespace installer { * @type { ?boolean } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isKeepData?: boolean; @@ -1965,7 +2025,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ hashParams?: Array; @@ -1975,7 +2036,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ crowdtestDeadline?: number; @@ -1985,7 +2047,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ sharedBundleDirPaths?: Array; @@ -1995,7 +2058,8 @@ declare namespace installer { * @type { ?string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ specifiedDistributionType?: string; @@ -2005,7 +2069,8 @@ declare namespace installer { * @type { ?string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ additionalInfo?: string; @@ -2026,7 +2091,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ pgoParams?: Array; @@ -2036,7 +2102,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Array; } @@ -2047,7 +2114,8 @@ declare namespace installer { * @typedef UninstallParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface UninstallParam { /** @@ -2056,7 +2124,8 @@ declare namespace installer { * @type { string } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -2066,7 +2135,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ versionCode?: number; } @@ -2077,7 +2147,8 @@ declare namespace installer { * @typedef CreateAppCloneParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface CreateAppCloneParam { /** @@ -2086,7 +2157,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ userId?: number; /** @@ -2095,7 +2167,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appIndex?: number; } @@ -2106,7 +2179,8 @@ declare namespace installer { * @typedef DestroyAppCloneParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DestroyAppCloneParam { /** @@ -2115,7 +2189,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ userId?: number; /** @@ -2124,7 +2199,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Array; } @@ -2135,7 +2211,8 @@ declare namespace installer { * @typedef PluginParam * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PluginParam { /** @@ -2144,7 +2221,8 @@ declare namespace installer { * @type { ?number } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ userId?: number; @@ -2154,7 +2232,8 @@ declare namespace installer { * @type { ?Array } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Array; } diff --git a/api/@ohos.bundle.launcherBundleManager.d.ts b/api/@ohos.bundle.launcherBundleManager.d.ts index 04a2b525eb088ff1f5fa8d0b7f8d30d4f69dc011..a42e07bd6f9cc0a0c3b55b263398b07e98f2c36d 100644 --- a/api/@ohos.bundle.launcherBundleManager.d.ts +++ b/api/@ohos.bundle.launcherBundleManager.d.ts @@ -18,9 +18,9 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ import { AsyncCallback } from './@ohos.base'; import { LauncherAbilityInfo as _LauncherAbilityInfo } from './bundleManager/LauncherAbilityInfo'; +/*** if arkts 1.1 */ import AbilityConstant from './@ohos.app.ability.AbilityConstant'; /*** endif */ import { ShortcutInfo as _ShortcutInfo, ShortcutWant as _ShortcutWant, ParameterItem as _ParameterItem } from './bundleManager/ShortcutInfo'; @@ -50,7 +50,8 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLauncherAbilityInfo(bundleName: string, userId: number, callback: AsyncCallback>): void; @@ -70,7 +71,8 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLauncherAbilityInfo(bundleName: string, userId: number): Promise>; @@ -86,7 +88,8 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLauncherAbilityInfoSync(bundleName: string, userId: number): Array; @@ -103,7 +106,8 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllLauncherAbilityInfo(userId: number, callback: AsyncCallback>): void; @@ -120,14 +124,15 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllLauncherAbilityInfo(userId: number): Promise>; /** * Obtains shortcut info based on a given bundleName. * - * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { AsyncCallback> } callback -The callback of the ShortcutInfo object result. * @throws { BusinessError } 201 - Verify permission denied. @@ -137,14 +142,15 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getShortcutInfo(bundleName: string, callback: AsyncCallback>): void; /** * Obtains shortcut info based on a given bundleName. * - * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. * @returns { Promise> } the LauncherShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. @@ -154,14 +160,15 @@ declare namespace launcherBundleManager { * @throws { BusinessError } 17700001 - The specified bundle name is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getShortcutInfo(bundleName: string): Promise>; /** * Obtains shortcut info based on a given bundleName. * - * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. * @returns { Array } the LauncherShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. @@ -180,7 +187,7 @@ declare namespace launcherBundleManager { /** * Obtains shortcut info based on bundleName and userId. * - * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } bundleName - Indicates the application bundle name to be queried. * @param { number } userId - Indicates the user ID. * @returns { Array } the LauncherShortcutInfo object. @@ -212,7 +219,6 @@ declare namespace launcherBundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 20 - * @arkts 1.1&1.2 */ function getShortcutInfoByAppIndex(bundleName: string, appIndex: number): Array; @@ -258,7 +264,8 @@ declare namespace launcherBundleManager { * * @typedef { _LauncherAbilityInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Launcher - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export type LauncherAbilityInfo = _LauncherAbilityInfo; diff --git a/api/@ohos.bundle.overlay.d.ts b/api/@ohos.bundle.overlay.d.ts index 56f0b171e9dfc5c821d63d75142d85d84d2d6bbc..f4bcece3b431ce1b9c80ccbb7041a6bda3a6821c 100755 --- a/api/@ohos.bundle.overlay.d.ts +++ b/api/@ohos.bundle.overlay.d.ts @@ -19,14 +19,20 @@ */ import { AsyncCallback } from './@ohos.base'; +/*** if arkts 1.1 */ import * as _OverlayModuleInfo from './bundleManager/OverlayModuleInfo'; +/*** endif */ +/*** if arkts 1.2 */ +import { OverlayModuleInfo as _OverlayModuleInfo } from './bundleManager/OverlayModuleInfo'; +/*** endif */ /** * Used for application interception overlay * * @namespace overlay * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace overlay { /** @@ -39,7 +45,8 @@ declare namespace overlay { * @throws { BusinessError } 17700002 - The specified module name is not found. * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setOverlayEnabled(moduleName: string, isEnabled: boolean, callback: AsyncCallback): void; @@ -53,7 +60,8 @@ declare namespace overlay { * @throws { BusinessError } 17700002 - The specified module name is not found. * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setOverlayEnabled(moduleName: string, isEnabled: boolean): Promise; @@ -74,7 +82,8 @@ declare namespace overlay { * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean, callback: AsyncCallback): void; @@ -96,7 +105,8 @@ declare namespace overlay { * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean): Promise; @@ -110,7 +120,8 @@ declare namespace overlay { * @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module. * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOverlayModuleInfo(moduleName: string, callback: AsyncCallback): void; @@ -124,7 +135,8 @@ declare namespace overlay { * @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module. * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOverlayModuleInfo(moduleName: string): Promise; @@ -137,7 +149,8 @@ declare namespace overlay { * @throws { BusinessError } 17700002 - The specified module name is not found. * @throws { BusinessError } 17700034 - The specified module is an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTargetOverlayModuleInfos(targetModuleName: string, callback: AsyncCallback>): void; @@ -151,7 +164,8 @@ declare namespace overlay { * @throws { BusinessError } 17700002 - The specified module name is not found. * @throws { BusinessError } 17700034 - The specified module is an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTargetOverlayModuleInfos(targetModuleName: string): Promise>; @@ -168,7 +182,8 @@ declare namespace overlay { * @throws { BusinessError } 17700032 - The specified bundle does not contain any overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOverlayModuleInfoByBundleName(bundleName: string, callback: AsyncCallback>): void; @@ -189,7 +204,8 @@ declare namespace overlay { * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOverlayModuleInfoByBundleName(bundleName: string, moduleName: string, callback: AsyncCallback>): void; @@ -210,7 +226,8 @@ declare namespace overlay { * @throws { BusinessError } 17700033 - The specified module is not an overlay module. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getOverlayModuleInfoByBundleName(bundleName: string, moduleName?: string): Promise>; @@ -228,7 +245,8 @@ declare namespace overlay { * @throws { BusinessError } 17700035 - The specified bundle is an overlay bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, callback: AsyncCallback>): void; @@ -249,7 +267,8 @@ declare namespace overlay { * @throws { BusinessError } 17700035 - The specified bundle is an overlay bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName: string, callback: AsyncCallback>): void; @@ -270,7 +289,8 @@ declare namespace overlay { * @throws { BusinessError } 17700035 - The specified bundle is an overlay bundle. * @syscap SystemCapability.BundleManager.BundleFramework.Overlay * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName?: string): Promise>; @@ -283,6 +303,16 @@ declare namespace overlay { * @since 10 */ export type OverlayModuleInfo = _OverlayModuleInfo.OverlayModuleInfo; + + /** + * Obtains configuration information about a overlay hap module. + * + * @typedef { _OverlayModuleInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.Overlay + * @since 20 + * @arkts 1.2 + */ + export type OverlayModuleInfo = _OverlayModuleInfo; } export default overlay; diff --git a/api/@ohos.calendarManager.d.ts b/api/@ohos.calendarManager.d.ts index b48223daa3e1ebb153efe31030b1e208958cdadb..579a6d245c8fc7b6125967561943474e7c150b1b 100644 --- a/api/@ohos.calendarManager.d.ts +++ b/api/@ohos.calendarManager.d.ts @@ -74,7 +74,7 @@ declare namespace calendarManager { export interface CalendarManager { /** * Create calendar instance. - * @permission ohos.permission.WRITE_CALENDAR + * @permission ohos.permission.WRITE_CALENDAR or ohos.permission.WRITE_WHOLE_CALENDAR * @param { CalendarAccount } calendarAccount - calendar account to create calendar * @returns { Promise } the promise with calendar corresponding to account * @throws { BusinessError } 201 - Permission denied. @@ -88,7 +88,7 @@ declare namespace calendarManager { /** * Create calendar instance. * - * @permission ohos.permission.WRITE_CALENDAR + * @permission ohos.permission.WRITE_CALENDAR or ohos.permission.WRITE_WHOLE_CALENDAR * @param { CalendarAccount } calendarAccount - calendar account to create calendar * @param { AsyncCallback } callback - the callback of createCalendar * @throws { BusinessError } 201 - Permission denied. @@ -102,7 +102,7 @@ declare namespace calendarManager { /** * Delete calendar instance. * - * @permission ohos.permission.WRITE_CALENDAR + * @permission ohos.permission.WRITE_CALENDAR or ohos.permission.WRITE_WHOLE_CALENDAR * @param { Calendar } calendar - calendar to be deleted * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -116,7 +116,7 @@ declare namespace calendarManager { /** * Delete calendar instance. * - * @permission ohos.permission.WRITE_CALENDAR + * @permission ohos.permission.WRITE_CALENDAR or ohos.permission.WRITE_WHOLE_CALENDAR * @param { Calendar } calendar - calendar to be deleted * @param { AsyncCallback } callback - the callback of deleteCalendar * @throws { BusinessError } 201 - Permission denied. @@ -130,8 +130,8 @@ declare namespace calendarManager { /** * Get calendar instance from database. * - * @permission ohos.permission.READ_CALENDAR - * @param { CalendarAccount } calendarAccount - specify calendar account to retrieve + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR + * @param { CalendarAccount } [calendarAccount] - specify calendar account to retrieve * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types. @@ -142,8 +142,8 @@ declare namespace calendarManager { /** * Get calendar instance from database. * - * @permission ohos.permission.READ_CALENDAR - * @param { CalendarAccount } calendarAccount - specify calendar account to retrieve + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR + * @param { CalendarAccount } [calendarAccount] - specify calendar account to retrieve * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types. @@ -157,7 +157,7 @@ declare namespace calendarManager { /** * Get calendar instance from database by specified account. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @param { CalendarAccount } calendarAccount - specify calendar account to retrieve * @param { AsyncCallback } callback - the callback of getCalendar * @throws { BusinessError } 201 - Permission denied. @@ -169,7 +169,7 @@ declare namespace calendarManager { /** * Get calendar instance from database by specified account. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @param { CalendarAccount } calendarAccount - specify calendar account to retrieve * @param { AsyncCallback } callback - the callback of getCalendar * @throws { BusinessError } 201 - Permission denied. @@ -184,7 +184,7 @@ declare namespace calendarManager { /** * Get default calendar instance from database. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @param { AsyncCallback } callback - the callback of getCalendar with default calendar instance * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -195,7 +195,7 @@ declare namespace calendarManager { /** * Get default calendar instance from database. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @param { AsyncCallback } callback - the callback of getCalendar with default calendar instance * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -209,7 +209,7 @@ declare namespace calendarManager { /** * Get all calendar instance. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types. @@ -222,7 +222,7 @@ declare namespace calendarManager { /** * Get all calendar instance. * - * @permission ohos.permission.READ_CALENDAR + * @permission ohos.permission.READ_CALENDAR or ohos.permission.READ_WHOLE_CALENDAR * @param {AsyncCallback} callback - the callback of getAllCalendars * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -343,6 +343,14 @@ declare namespace calendarManager { * @syscap SystemCapability.Applications.CalendarData * @since 10 */ + /** + * Delete a single event. + * @param { number } id - Indicates the ID of an event. + * @param {AsyncCallback} callback - The callback of deleteEvent. + * @syscap SystemCapability.Applications.CalendarData + * @atomicservice + * @since 19 + */ deleteEvent(id: number, callback: AsyncCallback): void; /** @@ -361,6 +369,14 @@ declare namespace calendarManager { * @syscap SystemCapability.Applications.CalendarData * @since 10 */ + /** + * Delete multiple events. + * @param { number[] } ids - Indicates the IDs of multiple events. + * @param {AsyncCallback} callback - The callback of deleteEvents. + * @syscap SystemCapability.Applications.CalendarData + * @atomicservice + * @since 19 + */ deleteEvents(ids: number[], callback: AsyncCallback): void; /** @@ -383,8 +399,8 @@ declare namespace calendarManager { /** * Query events based on filter conditions. - * @param { EventFilter } eventFilter - Indicates the filtering conditions of events. - * @param { (keyof Event)[] } eventKey - Expected column to be returned. + * @param { EventFilter } [eventFilter] - Indicates the filtering conditions of events. + * @param { (keyof Event)[] } [eventKey] - Expected column to be returned. * @returns { Promise } Information about events that match the filter conditions. * @syscap SystemCapability.Applications.CalendarData * @since 10 @@ -447,8 +463,8 @@ declare namespace calendarManager { * Query event instances based on the conditions. * @param { number } start - start time of query range * @param { number } end - end time of query range - * @param { number[] } ids - Indicates the IDs of multiple events - * @param { (keyof Event)[] } eventKey - Expected column to be returned + * @param { number[] } [ids] - Indicates the IDs of multiple events + * @param { (keyof Event)[] } [eventKey] - Expected column to be returned * @returns { Promise } Information about events that match the condition * @syscap SystemCapability.Applications.CalendarData * @atomicservice diff --git a/api/@ohos.charger.d.ts b/api/@ohos.charger.d.ts index a02a52cfd5b514f0e3d6d660c5bb9bb8b17ecf7c..03dad3db4096ce1e581038864e2397b7e432f49f 100644 --- a/api/@ohos.charger.d.ts +++ b/api/@ohos.charger.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ /** diff --git a/api/@ohos.commonEventManager.d.ts b/api/@ohos.commonEventManager.d.ts index 1055902283fac12dae45bf30a8115c13998eecf8..472432ef211fee6d068ba57df25847dc5b67db45 100644 --- a/api/@ohos.commonEventManager.d.ts +++ b/api/@ohos.commonEventManager.d.ts @@ -193,7 +193,8 @@ declare namespace commonEventManager { * @throws { BusinessError } 1500009 - Failed to obtain system parameters. * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ function publishAsUser(event: string, userId: number, callback: AsyncCallback): void; @@ -230,7 +231,8 @@ declare namespace commonEventManager { * @throws { BusinessError } 1500009 - Failed to obtain system parameters. * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ function publishAsUser( event: string, @@ -376,6 +378,7 @@ declare namespace commonEventManager { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function subscribeToEvent(subscriber: CommonEventSubscriber, callback: Callback): Promise; @@ -425,7 +428,8 @@ declare namespace commonEventManager { * @throws { BusinessError } 1500008 - Failed to initialize the common event service. * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function removeStickyCommonEvent(event: string, callback: AsyncCallback): void; @@ -444,7 +448,8 @@ declare namespace commonEventManager { * @throws { BusinessError } 1500008 - Failed to initialize the common event service. * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function removeStickyCommonEvent(event: string): Promise; @@ -461,7 +466,8 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setStaticSubscriberState(enable: boolean, callback: AsyncCallback): void; @@ -478,7 +484,8 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setStaticSubscriberState(enable: boolean): Promise; @@ -496,7 +503,8 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi Hide this for inner system use. * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function setStaticSubscriberState(enable: boolean, events?: Array): Promise; @@ -522,7 +530,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BOOT_COMPLETED = 'usual.event.BOOT_COMPLETED', @@ -530,7 +539,8 @@ declare namespace commonEventManager { * This commonEvent means when the device finnish booting, but still in the locked state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_LOCKED_BOOT_COMPLETED = 'usual.event.LOCKED_BOOT_COMPLETED', @@ -538,7 +548,8 @@ declare namespace commonEventManager { * This commonEvent means when the device is shutting down, note: turn off, not sleeping. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SHUTDOWN = 'usual.event.SHUTDOWN', @@ -546,7 +557,8 @@ declare namespace commonEventManager { * This commonEvent means when the charging state, level and so on about the battery. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BATTERY_CHANGED = 'usual.event.BATTERY_CHANGED', @@ -554,7 +566,8 @@ declare namespace commonEventManager { * This commonEvent means when the device in low battery state.. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BATTERY_LOW = 'usual.event.BATTERY_LOW', @@ -562,7 +575,8 @@ declare namespace commonEventManager { * This commonEvent means when the battery level is an ok state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BATTERY_OKAY = 'usual.event.BATTERY_OKAY', @@ -570,7 +584,8 @@ declare namespace commonEventManager { * This commonEvent means when the other power is connected to the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_POWER_CONNECTED = 'usual.event.POWER_CONNECTED', @@ -578,7 +593,8 @@ declare namespace commonEventManager { * This commonEvent means when the other power is removed from the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_POWER_DISCONNECTED = 'usual.event.POWER_DISCONNECTED', @@ -604,7 +620,8 @@ declare namespace commonEventManager { * This commonEvent means when the thermal state level change * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_THERMAL_LEVEL_CHANGED = 'usual.event.THERMAL_LEVEL_CHANGED', @@ -612,7 +629,8 @@ declare namespace commonEventManager { * This commonEvent means when the device is about to enter the force sleep mode * * @syscap SystemCapability.Notification.CommonEvent - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ENTER_FORCE_SLEEP = 'usual.event.ENTER_FORCE_SLEEP', @@ -620,7 +638,8 @@ declare namespace commonEventManager { * This commonEvent means when the device exits the force sleep mode * * @syscap SystemCapability.Notification.CommonEvent - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_EXIT_FORCE_SLEEP = 'usual.event.EXIT_FORCE_SLEEP', @@ -628,7 +647,8 @@ declare namespace commonEventManager { * This commonEvent means when the device is about to enter the hibernate mode * * @syscap SystemCapability.Notification.CommonEvent - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ENTER_HIBERNATE = 'usual.event.ENTER_HIBERNATE', @@ -636,7 +656,8 @@ declare namespace commonEventManager { * This commonEvent means when the device exits the hibernate mode * * @syscap SystemCapability.Notification.CommonEvent - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_EXIT_HIBERNATE = 'usual.event.EXIT_HIBERNATE', @@ -653,7 +674,8 @@ declare namespace commonEventManager { * This commonEvent means when the current time is changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_TIME_TICK = 'usual.event.TIME_TICK', @@ -670,7 +692,8 @@ declare namespace commonEventManager { * This commonEvent means when the current date is changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DATE_CHANGED = 'usual.event.DATE_CHANGED', @@ -687,7 +710,8 @@ declare namespace commonEventManager { * This commonEvent means when the dialog to dismiss. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CLOSE_SYSTEM_DIALOGS = 'usual.event.CLOSE_SYSTEM_DIALOGS', @@ -695,7 +719,8 @@ declare namespace commonEventManager { * This commonEvent means when a new application package is installed on the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_ADDED = 'usual.event.PACKAGE_ADDED', @@ -704,7 +729,8 @@ declare namespace commonEventManager { * replace the old version.the data contains the name of the package. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_REPLACED = 'usual.event.PACKAGE_REPLACED', @@ -713,7 +739,8 @@ declare namespace commonEventManager { * replace the old version, it does not contain additional data and only be sent to the replaced application. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_MY_PACKAGE_REPLACED = 'usual.event.MY_PACKAGE_REPLACED', @@ -721,7 +748,8 @@ declare namespace commonEventManager { * This commonEvent means when an existing application package is removed from the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_REMOVED = 'usual.event.PACKAGE_REMOVED', @@ -729,7 +757,8 @@ declare namespace commonEventManager { * This commonEvent means when an existing application package is removed from the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BUNDLE_REMOVED = 'usual.event.BUNDLE_REMOVED', @@ -737,7 +766,8 @@ declare namespace commonEventManager { * This commonEvent means when an existing application package is completely removed from the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_FULLY_REMOVED = 'usual.event.PACKAGE_FULLY_REMOVED', @@ -745,7 +775,8 @@ declare namespace commonEventManager { * This commonEvent means when an existing application package has been changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_CHANGED = 'usual.event.PACKAGE_CHANGED', @@ -753,7 +784,8 @@ declare namespace commonEventManager { * This commonEvent means the user has restarted a package, and all of its processes have been killed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_RESTARTED = 'usual.event.PACKAGE_RESTARTED', @@ -761,7 +793,8 @@ declare namespace commonEventManager { * This commonEvent means the user has cleared the package data. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_DATA_CLEARED = 'usual.event.PACKAGE_DATA_CLEARED', @@ -769,7 +802,8 @@ declare namespace commonEventManager { * This commonEvent means the user has cleared the package cache. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_CACHE_CLEARED = 'usual.event.PACKAGE_CACHE_CLEARED', @@ -777,7 +811,8 @@ declare namespace commonEventManager { * This commonEvent means the packages have been suspended. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGES_SUSPENDED = 'usual.event.PACKAGES_SUSPENDED', @@ -785,7 +820,8 @@ declare namespace commonEventManager { * This commonEvent means the packages have been un-suspended. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGES_UNSUSPENDED = 'usual.event.PACKAGES_UNSUSPENDED', @@ -793,7 +829,8 @@ declare namespace commonEventManager { * This commonEvent Sent to a package that has been suspended by the system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_MY_PACKAGE_SUSPENDED = 'usual.event.MY_PACKAGE_SUSPENDED', @@ -801,7 +838,8 @@ declare namespace commonEventManager { * Sent to a package that has been un-suspended. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_MY_PACKAGE_UNSUSPENDED = 'usual.event.MY_PACKAGE_UNSUSPENDED', @@ -809,7 +847,8 @@ declare namespace commonEventManager { * A user id has been removed from the system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_UID_REMOVED = 'usual.event.UID_REMOVED', @@ -817,7 +856,8 @@ declare namespace commonEventManager { * The application is first launched after installed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_FIRST_LAUNCH = 'usual.event.PACKAGE_FIRST_LAUNCH', @@ -825,7 +865,8 @@ declare namespace commonEventManager { * Sent by system package verifier when a package need to be verified. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION = 'usual.event.PACKAGE_NEEDS_VERIFICATION', @@ -833,7 +874,8 @@ declare namespace commonEventManager { * Sent by system package verifier when a package is verified. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_VERIFIED = 'usual.event.PACKAGE_VERIFIED', @@ -842,7 +884,8 @@ declare namespace commonEventManager { * available since the media on which they exist is available. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_EXTERNAL_APPLICATIONS_AVAILABLE = 'usual.event.EXTERNAL_APPLICATIONS_AVAILABLE', @@ -850,7 +893,8 @@ declare namespace commonEventManager { * Resources for a set of packages are currently unavailable since the media on which they exist is unavailable. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE = 'usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE', @@ -858,7 +902,8 @@ declare namespace commonEventManager { * The device configuration such as orientation,locale have been changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CONFIGURATION_CHANGED = 'usual.event.CONFIGURATION_CHANGED', @@ -866,7 +911,8 @@ declare namespace commonEventManager { * The current device's locale has changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_LOCALE_CHANGED = 'usual.event.LOCALE_CHANGED', @@ -874,7 +920,8 @@ declare namespace commonEventManager { * Indicates low memory condition notification acknowledged by user and package management should be started. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_MANAGE_PACKAGE_STORAGE = 'usual.event.MANAGE_PACKAGE_STORAGE', @@ -882,7 +929,8 @@ declare namespace commonEventManager { * Send by the smart function when the system in drive mode. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DRIVE_MODE = 'common.event.DRIVE_MODE', @@ -890,7 +938,8 @@ declare namespace commonEventManager { * Send by the smart function when the system in home mode. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_HOME_MODE = 'common.event.HOME_MODE', @@ -898,7 +947,8 @@ declare namespace commonEventManager { * Send by the smart function when the system in office mode. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_OFFICE_MODE = 'common.event.OFFICE_MODE', @@ -906,7 +956,8 @@ declare namespace commonEventManager { * Remind new user of preparing to start. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_STARTED = 'usual.event.USER_STARTED', @@ -914,7 +965,8 @@ declare namespace commonEventManager { * Remind previous user of that the service has been the background. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_BACKGROUND = 'usual.event.USER_BACKGROUND', @@ -922,7 +974,8 @@ declare namespace commonEventManager { * Remind new user of that the service has been the foreground. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_FOREGROUND = 'usual.event.USER_FOREGROUND', @@ -931,7 +984,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_SWITCHED = 'usual.event.USER_SWITCHED', @@ -940,7 +994,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_STARTING = 'usual.event.USER_STARTING', @@ -948,7 +1003,8 @@ declare namespace commonEventManager { * Remind new user of that the service has been unlocked. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_UNLOCKED = 'usual.event.USER_UNLOCKED', @@ -959,6 +1015,7 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi * @since 20 + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_LOCKING = 'usual.event.USER_LOCKING', @@ -969,6 +1026,7 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi * @since 20 + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_LOCKED = 'usual.event.USER_LOCKED', @@ -977,7 +1035,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_STOPPING = 'usual.event.USER_STOPPING', @@ -985,7 +1044,8 @@ declare namespace commonEventManager { * Remind new user of that the service has stopped. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_STOPPED = 'usual.event.USER_STOPPED', @@ -1032,7 +1092,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISTRIBUTED_ACCOUNT_TOKEN_INVALID = 'common.event.DISTRIBUTED_ACCOUNT_TOKEN_INVALID', @@ -1047,7 +1108,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISTRIBUTED_ACCOUNT_LOGOFF = 'common.event.DISTRIBUTED_ACCOUNT_LOGOFF', @@ -1055,7 +1117,8 @@ declare namespace commonEventManager { * WIFI state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_POWER_STATE = 'usual.event.wifi.POWER_STATE', @@ -1063,7 +1126,8 @@ declare namespace commonEventManager { * WIFI scan results. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_SCAN_FINISHED = 'usual.event.wifi.SCAN_FINISHED', @@ -1071,7 +1135,8 @@ declare namespace commonEventManager { * WIFI RSSI change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_RSSI_VALUE = 'usual.event.wifi.RSSI_VALUE', @@ -1079,7 +1144,8 @@ declare namespace commonEventManager { * WIFI connect state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_CONN_STATE = 'usual.event.wifi.CONN_STATE', @@ -1087,7 +1153,8 @@ declare namespace commonEventManager { * WIFI hotspot state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_HOTSPOT_STATE = 'usual.event.wifi.HOTSPOT_STATE', @@ -1095,7 +1162,8 @@ declare namespace commonEventManager { * WIFI ap sta join. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_AP_STA_JOIN = 'usual.event.wifi.WIFI_HS_STA_JOIN', @@ -1103,7 +1171,8 @@ declare namespace commonEventManager { * WIFI ap sta join. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_AP_STA_LEAVE = 'usual.event.wifi.WIFI_HS_STA_LEAVE', @@ -1111,7 +1180,8 @@ declare namespace commonEventManager { * Indicates Wi-Fi MpLink state notification acknowledged by binding or unbinding MpLink. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE = 'usual.event.wifi.mplink.STATE_CHANGE', @@ -1119,7 +1189,8 @@ declare namespace commonEventManager { * Indicates Wi-Fi P2P connection state notification acknowledged by connecting or disconnected P2P. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_CONN_STATE = 'usual.event.wifi.p2p.CONN_STATE_CHANGE', @@ -1127,7 +1198,8 @@ declare namespace commonEventManager { * Indicates that the Wi-Fi P2P state change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_STATE_CHANGED = 'usual.event.wifi.p2p.STATE_CHANGE', @@ -1135,7 +1207,8 @@ declare namespace commonEventManager { * Indicates that the Wi-Fi P2P peers state change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED = 'usual.event.wifi.p2p.DEVICES_CHANGE', @@ -1143,7 +1216,8 @@ declare namespace commonEventManager { * Indicates that the Wi-Fi P2P discovery state change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED = 'usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE', @@ -1151,7 +1225,8 @@ declare namespace commonEventManager { * Indicates that the Wi-Fi P2P current device state change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED = 'usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE', @@ -1159,7 +1234,8 @@ declare namespace commonEventManager { * Indicates that the Wi-Fi P2P group info is changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED = 'usual.event.wifi.p2p.GROUP_STATE_CHANGED', @@ -1168,230 +1244,294 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE = + 'usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE', /** * Bluetooth.handsfree.ag.current.device.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE = 'usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE = + 'usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE', /** * Bluetooth.handsfree.ag.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE = + 'usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE', /** * Bluetooth.a2dpsource.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE', /** * Bluetooth.a2dpsource.current.device.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE = 'usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE = + 'usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE', /** * Bluetooth.a2dpsource.playing.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE', /** * Bluetooth.a2dpsource.avrcp.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE', /** * Bluetooth.a2dpsource.codec.value.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_CHANGE */ - COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE = 'usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE = + 'usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE', /** * Bluetooth.remotedevice.discovered. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED = 'usual.event.bluetooth.remotedevice.DISCOVERED', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED = + 'usual.event.bluetooth.remotedevice.DISCOVERED', /** * Bluetooth.remotedevice.class.value.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE = 'usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE = + 'usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE', /** * Bluetooth.remotedevice.acl.connected. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED = 'usual.event.bluetooth.remotedevice.ACL_CONNECTED', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED = + 'usual.event.bluetooth.remotedevice.ACL_CONNECTED', /** * Bluetooth.remotedevice.acl.disconnected. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED = 'usual.event.bluetooth.remotedevice.ACL_DISCONNECTED', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED = + 'usual.event.bluetooth.remotedevice.ACL_DISCONNECTED', /** * Bluetooth.remotedevice.name.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE = 'usual.event.bluetooth.remotedevice.NAME_UPDATE', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE = + 'usual.event.bluetooth.remotedevice.NAME_UPDATE', /** * Bluetooth.remotedevice.pair.state. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 + * @useinstead commonEventManager.Support#COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE_CHANGE */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE = 'usual.event.bluetooth.remotedevice.PAIR_STATE', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE = + 'usual.event.bluetooth.remotedevice.PAIR_STATE', /** * Bluetooth.remotedevice.battery.value.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE = 'usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE = + 'usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE', /** * Bluetooth.remotedevice.sdp.result. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT = 'usual.event.bluetooth.remotedevice.SDP_RESULT', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT = + 'usual.event.bluetooth.remotedevice.SDP_RESULT', /** * Bluetooth.remotedevice.uuid.value. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE = 'usual.event.bluetooth.remotedevice.UUID_VALUE', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE = + 'usual.event.bluetooth.remotedevice.UUID_VALUE', /** * Bluetooth.remotedevice.pairing.req. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ = 'usual.event.bluetooth.remotedevice.PAIRING_REQ', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ = + 'usual.event.bluetooth.remotedevice.PAIRING_REQ', /** * Bluetooth.remotedevice.pairing.cancel. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL = 'usual.event.bluetooth.remotedevice.PAIRING_CANCEL', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL = + 'usual.event.bluetooth.remotedevice.PAIRING_CANCEL', /** * Bluetooth.remotedevice.connect.req. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ = 'usual.event.bluetooth.remotedevice.CONNECT_REQ', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ = + 'usual.event.bluetooth.remotedevice.CONNECT_REQ', /** * Bluetooth.remotedevice.connect.reply. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY = 'usual.event.bluetooth.remotedevice.CONNECT_REPLY', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY = + 'usual.event.bluetooth.remotedevice.CONNECT_REPLY', /** * Bluetooth.remotedevice.connect.cancel. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL = 'usual.event.bluetooth.remotedevice.CONNECT_CANCEL', + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL = + 'usual.event.bluetooth.remotedevice.CONNECT_CANCEL', /** * Bluetooth.handsfreeunit.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE = + 'usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE', /** * Bluetooth.handsfreeunit.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE = + 'usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE', /** * Bluetooth.handsfreeunit.ag.common.event. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT = 'usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT', + COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT = + 'usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT', /** * Bluetooth.handsfreeunit.ag.call.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE = + 'usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE', /** * Bluetooth.host.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE = 'usual.event.bluetooth.host.STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE = + 'usual.event.bluetooth.host.STATE_UPDATE', /** * Bluetooth.host.req.discoverable. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE = 'usual.event.bluetooth.host.REQ_DISCOVERABLE', + COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE = + 'usual.event.bluetooth.host.REQ_DISCOVERABLE', /** * Bluetooth.host.req.enable. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE = 'usual.event.bluetooth.host.REQ_ENABLE', @@ -1400,70 +1540,87 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE = 'usual.event.bluetooth.host.REQ_DISABLE', + COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE = + 'usual.event.bluetooth.host.REQ_DISABLE', /** * Bluetooth.host.scan.mode.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE = 'usual.event.bluetooth.host.SCAN_MODE_UPDATE', + COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE = + 'usual.event.bluetooth.host.SCAN_MODE_UPDATE', /** * Bluetooth.host.discovery.stated. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED = 'usual.event.bluetooth.host.DISCOVERY_STARTED', + COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED = + 'usual.event.bluetooth.host.DISCOVERY_STARTED', /** * Bluetooth.host.discovery.finished. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED = 'usual.event.bluetooth.host.DISCOVERY_FINISHED', + COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED = + 'usual.event.bluetooth.host.DISCOVERY_FINISHED', /** * Bluetooth.host.name.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE = 'usual.event.bluetooth.host.NAME_UPDATE', + COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE = + 'usual.event.bluetooth.host.NAME_UPDATE', /** * Bluetooth.a2dp.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE', /** * Bluetooth.a2dp.playing.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE', /** * Bluetooth.a2dp.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent * @since 9 + * @deprecated since 20 */ - COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE', + COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE = + 'usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE', /** * Nfc state change. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_NFC_ACTION_ADAPTER_STATE_CHANGED = 'usual.event.nfc.action.ADAPTER_STATE_CHANGED', @@ -1471,7 +1628,8 @@ declare namespace commonEventManager { * Nfc field on detected. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_NFC_ACTION_RF_FIELD_ON_DETECTED = 'usual.event.nfc.action.RF_FIELD_ON_DETECTED', @@ -1479,7 +1637,8 @@ declare namespace commonEventManager { * Nfc field off detected. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_NFC_ACTION_RF_FIELD_OFF_DETECTED = 'usual.event.nfc.action.RF_FIELD_OFF_DETECTED', @@ -1487,7 +1646,8 @@ declare namespace commonEventManager { * Sent when stop charging battery. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISCHARGING = 'usual.event.DISCHARGING', @@ -1495,7 +1655,8 @@ declare namespace commonEventManager { * Sent when start charging battery. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CHARGING = 'usual.event.CHARGING', @@ -1504,7 +1665,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CHARGE_TYPE_CHANGED = 'usual.event.CHARGE_TYPE_CHANGED', @@ -1512,7 +1674,8 @@ declare namespace commonEventManager { * Sent when device's idle mode changed * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED = 'usual.event.DEVICE_IDLE_MODE_CHANGED', @@ -1520,7 +1683,8 @@ declare namespace commonEventManager { * Sent when device's charge idle mode changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CHARGE_IDLE_MODE_CHANGED = 'usual.event.CHARGE_IDLE_MODE_CHANGED', @@ -1529,7 +1693,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED = 'usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED', @@ -1537,7 +1702,8 @@ declare namespace commonEventManager { * Sent when device's power save mode changed * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_POWER_SAVE_MODE_CHANGED = 'usual.event.POWER_SAVE_MODE_CHANGED', @@ -1546,7 +1712,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_ADDED = 'usual.event.USER_ADDED', @@ -1555,7 +1722,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USER_REMOVED = 'usual.event.USER_REMOVED', @@ -1563,7 +1731,8 @@ declare namespace commonEventManager { * Sent when ability is added. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ABILITY_ADDED = 'common.event.ABILITY_ADDED', @@ -1571,7 +1740,8 @@ declare namespace commonEventManager { * Sent when ability is removed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ABILITY_REMOVED = 'common.event.ABILITY_REMOVED', @@ -1579,7 +1749,8 @@ declare namespace commonEventManager { * Sent when ability is updated. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ABILITY_UPDATED = 'common.event.ABILITY_UPDATED', @@ -1587,7 +1758,8 @@ declare namespace commonEventManager { * Gps mode state changed. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_LOCATION_MODE_STATE_CHANGED = 'usual.event.location.MODE_STATE_CHANGED', @@ -1596,7 +1768,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_SLEEP = 'common.event.IVI_SLEEP', @@ -1605,7 +1778,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_PAUSE = 'common.event.IVI_PAUSE', @@ -1614,7 +1788,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_STANDBY = 'common.event.IVI_STANDBY', @@ -1623,7 +1798,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_LASTMODE_SAVE = 'common.event.IVI_LASTMODE_SAVE', @@ -1632,7 +1808,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_VOLTAGE_ABNORMAL = 'common.event.IVI_VOLTAGE_ABNORMAL', @@ -1642,7 +1819,8 @@ declare namespace commonEventManager { * please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_HIGH_TEMPERATURE = 'common.event.IVI_HIGH_TEMPERATURE', @@ -1652,7 +1830,8 @@ declare namespace commonEventManager { * please use COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_EXTREME_TEMPERATURE = 'common.event.IVI_EXTREME_TEMPERATURE', @@ -1661,7 +1840,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_TEMPERATURE_ABNORMAL = 'common.event.IVI_TEMPERATURE_ABNORMAL', @@ -1670,7 +1850,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_VOLTAGE_RECOVERY = 'common.event.IVI_VOLTAGE_RECOVERY', @@ -1679,7 +1860,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_TEMPERATURE_RECOVERY = 'common.event.IVI_TEMPERATURE_RECOVERY', @@ -1688,7 +1870,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_IVI_ACTIVE = 'common.event.IVI_ACTIVE', @@ -1697,7 +1880,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_STATE = 'usual.event.hardware.usb.action.USB_STATE', @@ -1706,7 +1890,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_PORT_CHANGED = 'usual.event.hardware.usb.action.USB_PORT_CHANGED', @@ -1715,7 +1900,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_DEVICE_ATTACHED = 'usual.event.hardware.usb.action.USB_DEVICE_ATTACHED', @@ -1724,7 +1910,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_DEVICE_DETACHED = 'usual.event.hardware.usb.action.USB_DEVICE_DETACHED', @@ -1733,7 +1920,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_ACCESSORY_ATTACHED = 'usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED', @@ -1742,7 +1930,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_USB_ACCESSORY_DETACHED = 'usual.event.hardware.usb.action.USB_ACCESSORY_DETACHED', @@ -1751,7 +1940,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_REMOVED = 'usual.event.data.DISK_REMOVED', @@ -1760,7 +1950,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_UNMOUNTED = 'usual.event.data.DISK_UNMOUNTED', @@ -1769,7 +1960,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_MOUNTED = 'usual.event.data.DISK_MOUNTED', @@ -1778,7 +1970,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_BAD_REMOVAL = 'usual.event.data.DISK_BAD_REMOVAL', @@ -1787,7 +1980,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_UNMOUNTABLE = 'usual.event.data.DISK_UNMOUNTABLE', @@ -1796,7 +1990,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DISK_EJECT = 'usual.event.data.DISK_EJECT', @@ -1806,7 +2001,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VOLUME_REMOVED = 'usual.event.data.VOLUME_REMOVED', @@ -1816,7 +2012,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VOLUME_UNMOUNTED = 'usual.event.data.VOLUME_UNMOUNTED', @@ -1826,7 +2023,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VOLUME_MOUNTED = 'usual.event.data.VOLUME_MOUNTED', @@ -1836,7 +2034,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VOLUME_BAD_REMOVAL = 'usual.event.data.VOLUME_BAD_REMOVAL', @@ -1846,7 +2045,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VOLUME_EJECT = 'usual.event.data.VOLUME_EJECT', @@ -1855,7 +2055,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED = 'usual.event.data.VISIBLE_ACCOUNTS_UPDATED', @@ -1865,7 +2066,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * This API can be called only by system applications. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_ACCOUNT_DELETED = 'usual.event.data.ACCOUNT_DELETED', @@ -1874,7 +2076,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_FOUNDATION_READY = 'common.event.FOUNDATION_READY', @@ -1883,7 +2086,8 @@ declare namespace commonEventManager { * Users can register this event to listen to the change of the airplane mode status of the device. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_AIRPLANE_MODE_CHANGED = 'usual.event.AIRPLANE_MODE', @@ -1898,7 +2102,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SPLIT_SCREEN = 'common.event.SPLIT_SCREEN', @@ -1908,7 +2113,8 @@ declare namespace commonEventManager { * This API can be called only by system applications. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SLOT_CHANGE = 'usual.event.SLOT_CHANGE', @@ -1917,7 +2123,8 @@ declare namespace commonEventManager { * This common event can be triggered only by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SPN_INFO_CHANGED = 'usual.event.SPN_INFO_CHANGED', @@ -1926,7 +2133,8 @@ declare namespace commonEventManager { * This common event can be triggered only by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_QUICK_FIX_APPLY_RESULT = 'usual.event.QUICK_FIX_APPLY_RESULT', @@ -1935,7 +2143,8 @@ declare namespace commonEventManager { * This common event can be triggered only by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = 'usual.event.QUICK_FIX_REVOKE_RESULT', @@ -1964,7 +2173,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIM_STATE_CHANGED = 'usual.event.SIM_STATE_CHANGED', @@ -1975,7 +2185,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SMS_RECEIVE_COMPLETED = 'usual.event.SMS_RECEIVE_COMPLETED', @@ -1985,7 +2196,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED = 'usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED', @@ -1995,7 +2207,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED = 'usual.event.SMS_CB_RECEIVE_COMPLETED', @@ -2007,7 +2220,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_STK_COMMAND = 'usual.event.STK_COMMAND', @@ -2019,7 +2233,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_STK_SESSION_END = 'usual.event.STK_SESSION_END', @@ -2031,7 +2246,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_STK_CARD_STATE_CHANGED = 'usual.event.STK_CARD_STATE_CHANGED', @@ -2043,7 +2259,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_STK_ALPHA_IDENTIFIER = 'usual.event.STK_ALPHA_IDENTIFIER', @@ -2053,7 +2270,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED = 'usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED', @@ -2063,7 +2281,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_OPERATOR_CONFIG_CHANGED = 'usual.event.OPERATOR_CONFIG_CHANGED', @@ -2073,7 +2292,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED = 'usual.event.SIM.DEFAULT_SMS_SUBSCRIPTION_CHANGED', @@ -2083,7 +2303,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED = 'usual.event.SIM.DEFAULT_DATA_SUBSCRIPTION_CHANGED', @@ -2093,7 +2314,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED = 'usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED', @@ -2103,7 +2325,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SET_PRIMARY_SLOT_STATUS = 'usual.event.SET_PRIMARY_SLOT_STATUS', @@ -2113,7 +2336,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PRIMARY_SLOT_ROAMING = 'usual.event.PRIMARY_SLOT_ROAMING', @@ -2123,7 +2347,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED = 'usual.event.SIM.DEFAULT_VOICE_SUBSCRIPTION_CHANGED', @@ -2134,7 +2359,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CALL_STATE_CHANGED = 'usual.event.CALL_STATE_CHANGED', @@ -2144,7 +2370,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED = 'usual.event.CELLULAR_DATA_STATE_CHANGED', @@ -2153,7 +2380,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_NETWORK_STATE_CHANGED = 'usual.event.NETWORK_STATE_CHANGED', @@ -2162,7 +2390,8 @@ declare namespace commonEventManager { * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SIGNAL_INFO_CHANGED = 'usual.event.SIGNAL_INFO_CHANGED', @@ -2174,7 +2403,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_INCOMING_CALL_MISSED = 'usual.event.INCOMING_CALL_MISSED', @@ -2184,7 +2414,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_RADIO_STATE_CHANGE = 'usual.event.RADIO_STATE_CHANGE', @@ -2194,7 +2425,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED = 'usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED', @@ -2209,7 +2441,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SCREEN_UNLOCKED = 'usual.event.SCREEN_UNLOCKED', @@ -2224,7 +2457,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SCREEN_LOCKED = 'usual.event.SCREEN_LOCKED', @@ -2241,7 +2475,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_CONNECTIVITY_CHANGE = 'usual.event.CONNECTIVITY_CHANGE', @@ -2251,7 +2486,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_SPECIAL_CODE = 'common.event.SPECIAL_CODE', @@ -2261,17 +2497,30 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_AUDIO_QUALITY_CHANGE = 'usual.event.AUDIO_QUALITY_CHANGE', + /** + * Indicates the action of a common event that bluetooth handsfree ag connection state change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_CHANGE = + 'usual.event.bluetooth.handsfree.ag.CONNECT_STATE_CHANGE', + /** * Indicates that the privacy status is changed. * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PRIVACY_STATE_CHANGED = 'usual.event.PRIVACY_STATE_CHANGED', @@ -2281,7 +2530,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_PACKAGE_INSTALLATION_STARTED = 'usual.event.PACKAGE_INSTALLATION_STARTED', @@ -2291,7 +2541,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DYNAMIC_ICON_CHANGED = 'usual.event.DYNAMIC_ICON_CHANGED', @@ -2325,7 +2576,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BUNDLE_RESOURCES_CHANGED = 'usual.event.BUNDLE_RESOURCES_CHANGED', @@ -2335,7 +2587,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DATA_SHARE_READY = 'usual.event.DATA_SHARE_READY', @@ -2345,7 +2598,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_VPN_CONNECTION_STATUS_CHANGED = 'usual.event.VPN_CONNECTION_STATUS_CHANGED', @@ -2357,16 +2611,73 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_RESTORE_START = 'usual.event.RESTORE_START', + /** + * Indicates the action of a common event that bluetooth a2dp source connection state change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_CHANGE = + 'usual.event.bluetooth.a2dpsource.CONNECT_STATE_CHANGE', + + /** + * Indicates the action of a common event that bluetooth avrcp connection state change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_CHANGE = + 'usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_CHANGE', + + /** + * Indicates the action of a common event that bluetooth codec change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_CHANGE = + 'usual.event.bluetooth.a2dpsource.CODEC_VALUE_CHANGE', + + /** + * Indicates the action of a common event that bluetooth remote device acl state change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_STATE_CHANGE = + 'usual.event.bluetooth.remotedevice.ACL_STATE_CHANGE', + + /** + * Indicates the action of a common event that bluetooth pair state change. + * To subscribe to this protected common event, your application must have the ohos.permission.ACCESS_BLUETOOTH + * + * @syscap SystemCapability.Notification.CommonEvent + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE_CHANGE = + 'usual.event.bluetooth.remotedevice.PAIR_STATE_CHANGE', + /** * Indicates that the managed browser policy is changed. * This is a protected common event that can only be sent by system. * * @syscap SystemCapability.Notification.CommonEvent - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_MANAGED_BROWSER_POLICY_CHANGED = 'usual.event.MANAGED_BROWSER_POLICY_CHANGED', @@ -2378,7 +2689,8 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_DEFAULT_APPLICATION_CHANGED = 'usual.event.DEFAULT_APPLICATION_CHANGED', @@ -2390,6 +2702,7 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi * @since 20 + * @arkts 1.1&1.2 */ COMMON_EVENT_SHORTCUT_CHANGED = 'usual.event.SHORTCUT_CHANGED', @@ -2432,6 +2745,16 @@ declare namespace commonEventManager { * @arkts 1.1&1.2 */ COMMON_EVENT_CUSTOM_ROAMING_REGION_UPDATED = 'usual.event.CUSTOM_ROAMING_REGION_UPDATED', + + /** + * This common event means that screen capture. + * This is a protected common event that can only be sent by system. + * @syscap SystemCapability.Notification.CommonEvent + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + COMMON_EVENT_SCREEN_SHARE = 'usual.event.SCREEN_SHARE', } /** @@ -2496,8 +2819,7 @@ declare namespace commonEventManager { * * @syscap SystemCapability.Notification.CommonEvent * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ /** * Describes the information of the subscriber diff --git a/api/@ohos.contact.d.ts b/api/@ohos.contact.d.ts index 9b495ada8a8979fb02ed848b74407c640066a5dc..a7d33a4af7df823ce7bfb8781ad7e444cecf4bb1 100644 --- a/api/@ohos.contact.d.ts +++ b/api/@ohos.contact.d.ts @@ -420,8 +420,8 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { string } key - Indicates the unique query key of a contact. - * @param { Holder } holder - Indicates the contact holder. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { Holder } [holder] - Indicates the contact holder. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise } Returns the specified contact. * @syscap SystemCapability.Applications.ContactsData @@ -437,8 +437,8 @@ declare namespace contact { * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. * @param { string } key - Indicates the unique query key of a contact. - * @param { Holder } holder - Indicates the contact holder. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { Holder } [holder] - Indicates the contact holder. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise } Returns the specified contact. * @throws { BusinessError } 201 - Permission denied. @@ -568,9 +568,9 @@ declare namespace contact { * Queries contacts with query conditions. * * @permission ohos.permission.READ_CONTACTS - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise> } Returns the {@code Contact} list object. * @syscap SystemCapability.Applications.ContactsData @@ -585,9 +585,9 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise> } Returns the {@code Contact} list object. * @throws { BusinessError } 201 - Permission denied. @@ -728,9 +728,9 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { string } email - Indicates the email address. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise> } Returns a {@code Contact} list object. * @syscap SystemCapability.Applications.ContactsData @@ -746,9 +746,9 @@ declare namespace contact { * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. * @param { string } email - Indicates the email address. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attributes. + * @param { ContactAttributes } [attrs] - Indicates the contact attributes. * If this parameter is null, all attributes are used for matching. * @returns { Promise> } Returns a {@code Contact} list object. * @throws { BusinessError } 201 - Permission denied. @@ -897,9 +897,9 @@ declare namespace contact { * @permission ohos.permission.READ_CONTACTS * @param { string } phoneNumber - Indicates the phone number. * Only full match is supported, and wildcards are not supported. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes will be used for matching. * @returns { Promise> } Returns the {@code Contact} list object. * @syscap SystemCapability.Applications.ContactsData @@ -916,9 +916,9 @@ declare namespace contact { * @param { Context } context - Indicates the context of application or capability. * @param { string } phoneNumber - Indicates the phone number. * Only full match is supported, and wildcards are not supported. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes will be used for matching. * @returns { Promise> } Returns the {@code Contact} list object. * @throws { BusinessError } 201 - Permission denied. @@ -986,7 +986,7 @@ declare namespace contact { * Queries contact groups by contact holder. * * @permission ohos.permission.READ_CONTACTS - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. * @returns { Promise> } Returns the contact group list object. * @syscap SystemCapability.Applications.ContactsData @@ -1001,7 +1001,7 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. * @returns { Promise> } Returns the contact group list object. * @throws { BusinessError } 201 - Permission denied. @@ -1124,7 +1124,7 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { number } id - Indicates the contact ID. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. * @returns { Promise } Returns the query key of the contact. * @syscap SystemCapability.Applications.ContactsData @@ -1140,7 +1140,7 @@ declare namespace contact { * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. * @param { number } id - Indicates the contact ID. - * @param { Holder } holder - Indicates the contact holder. + * @param { Holder } [holder] - Indicates the contact holder. * If this parameter is null, the default holder is used for matching. * @returns { Promise } Returns the query key of the contact. * @throws { BusinessError } 201 - Permission denied. @@ -1208,7 +1208,7 @@ declare namespace contact { * Queries information about "my card". * * @permission ohos.permission.READ_CONTACTS - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes are used for matching. * @returns { Promise } Returns information about "my card". * @syscap SystemCapability.Applications.ContactsData @@ -1223,7 +1223,7 @@ declare namespace contact { * * @permission ohos.permission.READ_CONTACTS * @param { Context } context - Indicates the context of application or capability. - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes are used for matching. * @returns { Promise } Returns information about "my card". * @throws { BusinessError } 201 - Permission denied. @@ -1296,7 +1296,7 @@ declare namespace contact { * * @permission ohos.permission.WRITE_CONTACTS * @param { Contact } contact - Indicates the contact whose information is to update. - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes are used for matching. * @returns { Promise } The promise returned by the function. * @syscap SystemCapability.Applications.ContactsData @@ -1312,7 +1312,7 @@ declare namespace contact { * @permission ohos.permission.WRITE_CONTACTS * @param { Context } context - Indicates the context of application or capability. * @param { Contact } contact - Indicates the contact whose information is to update. - * @param { ContactAttributes } attrs - Indicates the contact attribute. + * @param { ContactAttributes } [attrs] - Indicates the contact attribute. * If this parameter is null, all attributes are used for matching. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. diff --git a/api/@ohos.cooperate.d.ts b/api/@ohos.cooperate.d.ts index b5640c5425ff3285b60cbf456a540d71dd0985ba..83f3799be64e9e80b92eed8ae116754c2e7f7e82 100644 --- a/api/@ohos.cooperate.d.ts +++ b/api/@ohos.cooperate.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -726,8 +726,6 @@ declare namespace cooperate { * @returns { Promise } the promise returned by the function. * @throws {BusinessError} 201 - Permission denied. * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. - * @throws {BusinessError} 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2.Incorrect parameter types.3.Parameter verification failed. * @throws {BusinessError} 20900001 - Operation failed. * @syscap SystemCapability.Msdp.DeviceStatus.Cooperate * @systemapi Hide this for inner system use. diff --git a/api/@ohos.curves.d.ets b/api/@ohos.curves.d.ets deleted file mode 100644 index fe63ee3ae2ff289c2f627261c26d32ad8c1a1bb2..0000000000000000000000000000000000000000 --- a/api/@ohos.curves.d.ets +++ /dev/null @@ -1,770 +0,0 @@ -/* - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare namespace curves { - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - enum Curve { - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Linear, - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Ease, - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - EaseIn, - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - EaseOut, - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - EaseInOut, - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - FastOutSlowIn, - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - LinearOutSlowIn, - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - FastOutLinearIn, - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - ExtremeDeceleration, - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Sharp, - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Rhythm, - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Smooth, - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - Friction, - } - - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - interface ICurve { - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - interpolate(fraction: number): number; - } - - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] The default value is Curve.Linear - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] The default value is Curve.Linear - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] The default value is Curve.Linear - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function initCurve(curve?: Curve): ICurve; - - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead initCurve - */ - function init(curve?: Curve): string; - - /** - * Constructs a step curve when called. - * - * @param { number } count -The number of steps. The range of this value is [1, +∞). - * @param { boolean } end -A step change occurs at the start or end of each interval. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a step curve when called. - * - * @param { number } count -The number of steps. The range of this value is [1, +∞). - * @param { boolean } end -A step change occurs at the start or end of each interval. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a step curve when called. - * - * @param { number } count -The number of steps. The range of this value is [1, +∞). - * @param { boolean } end -A step change occurs at the start or end of each interval. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function stepsCurve(count: number, end: boolean): ICurve; - - /** - * Constructs a custom curve when called. - * - * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a custom curve when called. - * - * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function customCurve(interpolate: (fraction: number) => number): ICurve; - - /** - * Constructs a step curve when called. - * - * @param { number } count - * @param { boolean } end - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead stepsCurve - */ - function steps(count: number, end: boolean): string; - - /** - * Constructs a third-order Bezier curve when called. - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a third-order Bezier curve when called. - * - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a third-order Bezier curve when called. - * - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; - - /** - * Constructs a third-order Bezier curve when called. - * - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead cubicBezierCurve - */ - function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; - - /** - * Constructs a spring curve when called. For more information about the meaning of the parameter, see spring(). - * - * @param { number } velocity -Value range (-∞, +∞). - * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a spring curve when called. - * - * @param { number } velocity -Value range (-∞, +∞). - * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a spring curve when called. - * - * @param { number } velocity -Value range (-∞, +∞). - * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; - - /** - * Constructs a spring curve when called. - * - * @param { number } velocity -Initial velocity. An influence parameter of external factors on elastic dynamics, - * purpose is to ensure a smooth transition of the object from the previous state of motion to the elastic dynamics. - * @param { number } mass -Quality. The force object of the elastic system will have an inertial effect on elastic - * system. The greater the mass, the greater the amplitude of the oscillation. - * @param { number } stiffness -The degree to which an object is deformed by resisting the applied force. - * @param { number } damping -Pure number, Used to describe oscillation and decay of a system after being disturbed. - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead springCurve - */ - function spring(velocity: number, mass: number, stiffness: number, damping: number): string; - - /** - * Constructs a spring motion when called. - * - * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.55 is used. - * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.825 is used. - * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a spring motion when called. - * - * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.55 is used. - * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.825 is used. - * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a spring motion when called. - * - * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.55 is used. - * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.825 is used. - * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; - - /** - * Constructs a responsive spring motion when called. - * - * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.15 is used. - * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.86 is used. - * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.25 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a responsive spring motion when called. - * - * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.15 is used. - * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.86 is used. - * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.25 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs a responsive spring motion when called. - * The parameters are interpreted as in springMotion. - * - * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.15 is used. - * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.86 is used. - * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.25 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; - - /** - * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, - * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator - * to calculate the actual animation values. - * - * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the - * value changes from 0 to 1,specific value range (-∞, ∞). - * @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } stiffness - the stiffness of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } damping - the damping value of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, - * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator - * to calculate the actual animation values. - * - * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the - * value changes from 0 to 1,specific value range (-∞, ∞). - * @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } stiffness - the stiffness of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } damping - the damping value of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; -} -export default curves; \ No newline at end of file diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 3c0b0007a82ea62ef7d470dd22b0135152518044..c6a23ad9a1d6db4e752d28b8520263503a36f859 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -42,6 +42,17 @@ * @atomicservice * @since 11 */ +/** + * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. + * + * @namespace curves + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ declare namespace curves { /** * enum Curve. @@ -67,7 +78,18 @@ declare namespace curves { * @atomicservice * @since 11 */ - enum Curve { + /** + * enum Curve. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + export enum Curve { /** * Linear. Indicates that the animation has the same velocity from start to finish. * @@ -89,6 +111,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Linear. Indicates that the animation has the same velocity from start to finish. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Linear, /** * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, @@ -114,6 +146,17 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, + * CubicBezier(0.25, 0.1, 0.25, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Ease, /** * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). @@ -136,6 +179,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ EaseIn, /** * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). @@ -158,6 +211,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ EaseOut, /** * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). @@ -180,6 +243,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ EaseInOut, /** * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). @@ -202,6 +275,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ FastOutSlowIn, /** * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). @@ -224,6 +307,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ LinearOutSlowIn, /** * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). @@ -246,6 +339,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ FastOutLinearIn, /** * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). @@ -268,6 +371,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ ExtremeDeceleration, /** * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). @@ -290,6 +403,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Sharp, /** * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). @@ -312,6 +435,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Rhythm, /** * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). @@ -334,6 +467,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Smooth, /** * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). @@ -356,6 +499,16 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ Friction, } @@ -383,7 +536,18 @@ declare namespace curves { * @atomicservice * @since 11 */ - interface ICurve { + /** + * Interface for curve object. + * + * @interface ICurve + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + export interface ICurve { /** * Get curve value by fraction. * @@ -416,6 +580,19 @@ declare namespace curves { * @atomicservice * @since 11 */ + /** + * Get curve value by fraction. + * + * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. + * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ interpolate(fraction: number): number; } @@ -445,9 +622,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function initCurve(curve?: Curve): ICurve; + export function initCurve(curve?: Curve): ICurve; /** * Initializes the interpolator curve when called. @@ -494,9 +672,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function stepsCurve(count: number, end: boolean): ICurve; + export function stepsCurve(count: number, end: boolean): ICurve; /** * Constructs a custom curve when called. @@ -513,8 +692,8 @@ declare namespace curves { * @param { function } interpolate - Custom interpolation callback.fraction: input x value for interpolation. * when the animation starts. Value range: [0, 1]The return value is the y value of the curve. Value range: [0, 1]. *

**NOTE**: - *
If fraction is 0, the return value 0 corresponds to the animation start point; any other return value means that - *
the animation jumps at the start point.If fraction is 1, the return value 1 corresponds to the animation + *
If fraction is 0, the return value 0 corresponds to the animation start point; any other return value means + *
that the animation jumps at the start point.If fraction is 1, the return value 1 corresponds to the animation *
end point; any other return value means that the end value of the animation is not the value of the state *
variable, which will result in an effect of transition from that end value to the value of the state variable. *

@@ -522,9 +701,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function customCurve(interpolate: (fraction: number) => number): ICurve; + export function customCurve(interpolate: (fraction: number) => number): ICurve; /** * Constructs a step curve when called. @@ -582,9 +762,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + export function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; /** * Creates a cubic Bezier curve. The curve value must range from 0 to 1. This API is deprecated since API version 9. @@ -657,9 +838,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + export function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; /** * Constructs a spring curve when called. @@ -738,9 +920,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + export function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** * Constructs a responsive spring motion when called. @@ -797,9 +980,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + export function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, @@ -850,9 +1034,10 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + export function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; } export default curves; diff --git a/api/@ohos.data.ValuesBucket.d.ts b/api/@ohos.data.ValuesBucket.d.ts index afa9159700469f6a36099c41face4d69aa6bf5d5..7b23ad4b01bc7064190c06e96d8008218e26369c 100644 --- a/api/@ohos.data.ValuesBucket.d.ts +++ b/api/@ohos.data.ValuesBucket.d.ts @@ -43,7 +43,8 @@ * @stagemodelonly * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 + * @arkts 1.1&1.2 */ export type ValueType = number | string | boolean; @@ -53,6 +54,7 @@ export type ValueType = number | string | boolean; * @typedef { Record } * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @stagemodelonly - * @since arkts {'1.1':'10', '1.2':'20'} + * @since arkts{ '1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export type ValuesBucket = Record; diff --git a/api/@ohos.data.cloudData.d.ts b/api/@ohos.data.cloudData.d.ts index f068180d4df59c8614c5c70647f3210ff86d2bc2..00e897d446742fc0e77e74e6bcbcc7d4834dc8ef 100644 --- a/api/@ohos.data.cloudData.d.ts +++ b/api/@ohos.data.cloudData.d.ts @@ -649,13 +649,11 @@ declare namespace cloudData { * @throws { BusinessError } 202 - Permission verification failed, *
application which is not a system application uses system API. * @throws { BusinessError } 801 - Capability not supported. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @static * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 20 - * @arkts 1.1&1.2 */ static cloudSync( bundleName: string, diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index 8256ff332d3d5864e13e4cdf14ac3a0d7feefbe7..4e94a9af57b7def4f1be0bb408fdf0e2d10c0244 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -31,8 +31,7 @@ import { ValuesBucket, ValueType } from './@ohos.data.ValuesBucket'; * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ /** * This module provides the dataShare capability for consumer. @@ -547,24 +546,23 @@ declare namespace dataShare { } /** - * Enumerates the data change types. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @systemapi - * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - /** - * Enumerates the data change types. - * - * @enum { number } - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @stagemodelonly - * @since 20 - * @arkts 1.1&1.2 - */ + * Enumerates the data change types. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @stagemodelonly + * @since 12 + */ + /** + * Enumerates the data change types. + * + * @enum { number } + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ enum ChangeType { /** * Data inserted. @@ -572,8 +570,7 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ /** * Data inserted. @@ -586,40 +583,38 @@ declare namespace dataShare { INSERT = 0, /** - * Data deleted. - * - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @systemapi - * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - /** - * Data deleted. - * - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @stagemodelonly - * @since 20 - * @arkts 1.1&1.2 - */ + * Data deleted. + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @stagemodelonly + * @since 12 + */ + /** + * Data deleted. + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ DELETE, /** - * Data updated. - * - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @systemapi - * @stagemodelonly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 - */ - /** - * Data updated. - * - * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer - * @stagemodelonly - * @since 20 - * @arkts 1.1&1.2 - */ + * Data updated. + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @systemapi + * @stagemodelonly + * @since 12 + */ + /** + * Data updated. + * + * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ UPDATE } /** @@ -2086,6 +2081,7 @@ declare namespace dataShare { * @returns { DataProxyResult[] } : The operation result. * @throws { BusinessError } 15700000 - Inner error. Possible causes: The service is not ready or is being * restarted abnormally. + * @throws { BusinessError } 15700014 - The parameter format is incorrect or the value range is invalid. * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @stagemodelonly * @since 20 @@ -2104,10 +2100,11 @@ declare namespace dataShare { * @param { 'dataChange' } event - Event type must be 'sharedDataChange'. * @param { string[] } uris - Indicates the uris of the data to operate. * @param { DataProxyConfig } config - Indicates the configuration of the data proxy operation. - * @param { AsyncCallback } callback - The callback function when data changes. + * @param { AsyncCallback } [callback] - The callback function when data changes. * @returns { DataProxyResult[] } : The operation result. * @throws { BusinessError } 15700000 - Inner error. Possible causes: The service is not ready or is being * restarted abnormally. + * @throws { BusinessError } 15700014 - The parameter format is incorrect or the value range is invalid. * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @stagemodelonly * @since 20 @@ -2131,6 +2128,7 @@ declare namespace dataShare { * @returns { Promise } : The operation result. * @throws { BusinessError } 15700000 - Inner error. Possible causes: The service is not ready or is being * restarted abnormally. + * @throws { BusinessError } 15700014 - The parameter format is incorrect or the value range is invalid. * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @stagemodelonly * @since 20 @@ -2147,6 +2145,7 @@ declare namespace dataShare { * @returns { Promise } : The operation result. * @throws { BusinessError } 15700000 - Inner error. Possible causes: The service is not ready or is being * restarted abnormally. + * @throws { BusinessError } 15700014 - The parameter format is incorrect or the value range is invalid. * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @stagemodelonly * @since 20 @@ -2163,6 +2162,7 @@ declare namespace dataShare { * @returns { Promise } : The operation result. * @throws { BusinessError } 15700000 - Inner error. Possible causes: The service is not ready or is being * restarted abnormally. + * @throws { BusinessError } 15700014 - The parameter format is incorrect or the value range is invalid. * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @stagemodelonly * @since 20 diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index e11cc4ae833c1428d9ebd3cd9681562e5e6ff396..0de6f7875172eb15defdf6adf79677f8539a7b61 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -581,7 +581,7 @@ declare namespace distributedDataObject { * Off watch of change. * * @param { 'change' } type - Event type, fixed as 'change', indicates data change. - * @param { DataObserver } callback - The observer of object data changed, if not null, off the callback, if undefined, off all callbacks. + * @param { DataObserver } [callback] - The observer of object data changed, if not null, off the callback, if undefined, off all callbacks. * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject * @since 20 */ @@ -601,7 +601,7 @@ declare namespace distributedDataObject { * Off watch of status. * * @param { 'status' } type - Event type, fixed as 'status', indicates the online and offline of the object. - * @param { StatusObserver } callback - The observer of object status changed, if not null, off the callback, if undefined, off all callbacks. + * @param { StatusObserver } [callback] - The observer of object status changed, if not null, off the callback, if undefined, off all callbacks. * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject * @since 20 */ diff --git a/api/@ohos.data.distributedKVStore.d.ts b/api/@ohos.data.distributedKVStore.d.ts index 7c1b0573d54e5a40ca32f32f942730febf7fafa6..f2f8b8d2544ade741bbdb32a39e34251d9d35c83 100644 --- a/api/@ohos.data.distributedKVStore.d.ts +++ b/api/@ohos.data.distributedKVStore.d.ts @@ -1439,7 +1439,7 @@ declare namespace distributedKVStore { * @StageModelOnly * @since 10 */ - delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback); + delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; /** * Deletes the key-value pairs based on the dataSharePredicates. @@ -3009,6 +3009,7 @@ declare namespace distributedKVStore { * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 @@ -3025,6 +3026,7 @@ declare namespace distributedKVStore { * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameters types. * @throws { BusinessError } 15100003 - Database corrupted. + * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 886d4d14fc1858dc08fbc19b519073ec67530996..e5ab99576266accb7a4837349de55f94f1244705 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -2131,7 +2131,7 @@ declare namespace relationalStore { * * @param { string } name - Indicates the table name of the database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2140,7 +2140,7 @@ declare namespace relationalStore { * * @param { string } name - Indicates the table name of the database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since arkts {'1.1':'10', '1.2':'20'} @@ -2155,7 +2155,7 @@ declare namespace relationalStore { * @param { Array } devices - Indicates specified remote devices. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2180,7 +2180,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2193,7 +2193,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2209,7 +2209,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2222,7 +2222,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2314,7 +2314,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2327,7 +2327,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2343,7 +2343,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2356,7 +2356,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2372,7 +2372,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2385,7 +2385,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2399,7 +2399,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name in the database table. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2410,7 +2410,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name in the database table. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2424,7 +2424,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name in the database table. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2435,7 +2435,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name in the database table. * @returns { RdbPredicates } - The {@link RdbPredicates} self. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2451,7 +2451,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2464,7 +2464,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The {@link RdbPredicates} that match the specified field. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2480,7 +2480,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2493,7 +2493,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2508,7 +2508,7 @@ declare namespace relationalStore { * @param { ValueType } high - Indicates the maximum value. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2520,7 +2520,7 @@ declare namespace relationalStore { * @param { ValueType } high - Indicates the maximum value. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2535,7 +2535,7 @@ declare namespace relationalStore { * @param { ValueType } high - Indicates the maximum value. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2547,7 +2547,7 @@ declare namespace relationalStore { * @param { ValueType } high - Indicates the maximum value. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2561,7 +2561,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2572,7 +2572,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2586,7 +2586,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2597,7 +2597,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2611,7 +2611,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2622,7 +2622,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2636,7 +2636,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2647,7 +2647,7 @@ declare namespace relationalStore { * @param { ValueType } value - Indicates the value to match with the {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2661,7 +2661,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name for sorting the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2672,7 +2672,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name for sorting the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2686,7 +2686,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name for sorting the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2697,7 +2697,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the column name for sorting the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2727,7 +2727,7 @@ declare namespace relationalStore { * @param { number } value - Indicates the max length of the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2737,7 +2737,7 @@ declare namespace relationalStore { * @param { number } value - Indicates the max length of the return list. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2752,7 +2752,7 @@ declare namespace relationalStore { * The value is a positive integer. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2764,7 +2764,7 @@ declare namespace relationalStore { * The value is a positive integer. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2777,7 +2777,7 @@ declare namespace relationalStore { * @param { Array } fields - Indicates the specified columns by which query results are grouped. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2787,7 +2787,7 @@ declare namespace relationalStore { * @param { Array } fields - Indicates the specified columns by which query results are grouped. * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2801,7 +2801,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the name of the index column. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2812,7 +2812,7 @@ declare namespace relationalStore { * @param { string } field - Indicates the name of the index column. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2827,7 +2827,7 @@ declare namespace relationalStore { * @param { Array } value - Indicates the values to match with {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2839,7 +2839,7 @@ declare namespace relationalStore { * @param { Array } value - Indicates the values to match with {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2854,7 +2854,7 @@ declare namespace relationalStore { * @param { Array } value - Indicates the values to match with {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -2866,7 +2866,7 @@ declare namespace relationalStore { * @param { Array } value - Indicates the values to match with {@link RdbPredicates}. * @returns { RdbPredicates } - The SQL statement with the specified {@link RdbPredicates}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -2882,7 +2882,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value that is not contained. * @returns { RdbPredicates } - The {@Link RdbPredicates} set. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ @@ -2895,7 +2895,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value that is not contained. * @returns { RdbPredicates } - The {@Link RdbPredicates} set. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -2911,7 +2911,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to compare against. * @returns { RdbPredicates } - The {@Link RdbPredicates} set. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ @@ -2924,7 +2924,7 @@ declare namespace relationalStore { * @param { string } value - Indicates the value to compare against. * @returns { RdbPredicates } - The {@Link RdbPredicates} set. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -2937,8 +2937,8 @@ declare namespace relationalStore { * @param { string } conditions - Conditions used to filter the data obtained using GROUP BY. * @param { Array } args - Parameters to be used in the conditions. * @returns { RdbPredicates } - Returns the RdbPredicates object. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range; + *
2. Missing GROUP BY clause. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -3127,7 +3127,7 @@ declare namespace relationalStore { * @returns { number } The index of the specified column. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3139,7 +3139,7 @@ declare namespace relationalStore { * @returns { number } The index of the specified column. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3151,10 +3151,10 @@ declare namespace relationalStore { * @param { string } columnName - Indicates the name of the specified column in the result set. * @returns { number } The index of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800019 - The SQL must be a query statement. * @throws { BusinessError } 14800021 - SQLite: Generic error. @@ -3187,7 +3187,7 @@ declare namespace relationalStore { * @returns { string } The name of the specified column. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3199,7 +3199,7 @@ declare namespace relationalStore { * @returns { string } The name of the specified column. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3211,10 +3211,10 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the index of the specified column in the result set. * @returns { string } The name of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800019 - The SQL must be a query statement. * @throws { BusinessError } 14800021 - SQLite: Generic error. @@ -3246,11 +3246,11 @@ declare namespace relationalStore { * @returns { Promise } Promise used to return the data type obtained, * in an {@link ColumnType} instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800019 - The SQL must be a query statement. * @throws { BusinessError } 14800021 - SQLite: Generic error. @@ -3280,11 +3280,11 @@ declare namespace relationalStore { * @param { number | string } columnIdentifier - Index or name of the column. * @returns { ColumnType } Column data type obtained. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800019 - The SQL must be a query statement. * @throws { BusinessError } 14800021 - SQLite: Generic error. @@ -3317,7 +3317,7 @@ declare namespace relationalStore { * Returns false otherwise. * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3330,7 +3330,7 @@ declare namespace relationalStore { * Returns false otherwise. * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3343,7 +3343,7 @@ declare namespace relationalStore { * @returns { boolean } True if the result set is moved successfully and does not go beyond the range; * Returns false otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. @@ -3377,7 +3377,7 @@ declare namespace relationalStore { * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3388,7 +3388,7 @@ declare namespace relationalStore { * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. * @throws { BusinessError } 14800012 - The result set is empty or the specified location is invalid. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3399,7 +3399,7 @@ declare namespace relationalStore { * @param { number } position - Indicates the index of the specified row, which starts from 0. * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. @@ -3636,7 +3636,7 @@ declare namespace relationalStore { * @returns { Uint8Array } The value of the specified column as a byte array. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3649,7 +3649,7 @@ declare namespace relationalStore { * @returns { Uint8Array } The value of the specified column as a byte array. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3662,11 +3662,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { Uint8Array } The value of the specified column as a byte array. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3698,7 +3698,7 @@ declare namespace relationalStore { * @returns { string } The value of the specified column as a string. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3711,7 +3711,7 @@ declare namespace relationalStore { * @returns { string } The value of the specified column as a string. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3724,11 +3724,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { string } The value of the specified column as a string. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3761,7 +3761,7 @@ declare namespace relationalStore { * @returns { number } The value of the specified column as a long. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3774,7 +3774,7 @@ declare namespace relationalStore { * @returns { number } The value of the specified column as a long. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3787,11 +3787,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { number } The value of the specified column as a long. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3824,7 +3824,7 @@ declare namespace relationalStore { * @returns { number } The value of the specified column as a double. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -3837,7 +3837,7 @@ declare namespace relationalStore { * @returns { number } The value of the specified column as a double. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3850,11 +3850,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { number } The value of the specified column as a double. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3886,7 +3886,7 @@ declare namespace relationalStore { * @returns { Asset } The value of the specified column as an asset. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3899,11 +3899,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { Asset } The value of the specified column as an asset. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3935,7 +3935,7 @@ declare namespace relationalStore { * @returns { Assets } The value of the specified column as assets. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -3948,11 +3948,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { Assets } The value of the specified column as assets. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -3983,11 +3983,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { ValueType } The value of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4017,11 +4017,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { ValueType } The value of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4051,11 +4051,11 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { ValueType } The value of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4078,32 +4078,6 @@ declare namespace relationalStore { */ getValue(columnIndex: number): ValueType; - /** - * Obtains the value of the specified column in the current row. - * The implementation class determines whether to throw an exception if the value of the specified column - * in the current row is null or the specified column is not of the Assets type. - * If the value of the specified column in the current row exceeds the value range of number, return a string type. - * Only for flutter - * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { ValueType } The value of the specified column. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 20 - */ - getValueForFlutter(columnIndex: number): ValueType - /** * Obtains the value of the specified column in the current row as a float array. * The implementation class determines whether to throw an exception if the value of the specified column @@ -4112,10 +4086,10 @@ declare namespace relationalStore { * @param { number } columnIndex - Indicates the specified column index, which starts from 0. * @returns { Float32Array } The value of the specified column as a float array. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - The capability is not supported because the database is not a vector DB. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4154,7 +4128,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4184,7 +4158,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4207,29 +4181,6 @@ declare namespace relationalStore { */ getRow(): ValuesBucket; - /** - * Obtains the values of all columns in the specified row. - * If the value of a column in the current row exceeds the value range of number, return a string type. - * Only for flutter - * - * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. - * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. - * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. - * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. - * @throws { BusinessError } 14800023 - SQLite: Access permission denied. - * @throws { BusinessError } 14800024 - SQLite: The database file is locked. - * @throws { BusinessError } 14800025 - SQLite: A table in the database is locked. - * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. - * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. - * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. - * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @crossplatform - * @since 20 - */ - getRowForFlutter(): ValuesBucket - /** * Obtains the values of all columns in the specified rows. * @param { number } maxCount - Indicates the maximum number of rows. @@ -4237,11 +4188,11 @@ declare namespace relationalStore { * @returns { Promise> } Promise used to return the values obtained, * in an {@link Array}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4269,7 +4220,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4299,7 +4250,7 @@ declare namespace relationalStore { * Returns false otherwise. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -4311,7 +4262,7 @@ declare namespace relationalStore { * Returns false otherwise. * @throws { BusinessError } 14800013 - The column value is null or the column type is incompatible. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -4323,11 +4274,11 @@ declare namespace relationalStore { * @returns { boolean } True if the value of the specified column in the current row is null; * Returns false otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. - * @throws { BusinessError } 14800013 - Resultset is empty or column index is out of bounds. + * @throws { BusinessError } 14800013 - ResultSet is empty or column index is out of bounds. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800021 - SQLite: Generic error. * Possible causes: Insert failed or the updated data does not exist. @@ -4404,7 +4355,7 @@ declare namespace relationalStore { * Obtains the RdbStore version. * * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -4413,7 +4364,7 @@ declare namespace relationalStore { * Obtains the RdbStore version. * * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -4424,7 +4375,7 @@ declare namespace relationalStore { * * @type { number } * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4461,7 +4412,7 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -4474,7 +4425,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4487,7 +4438,7 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4523,7 +4474,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4537,7 +4488,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @param { AsyncCallback } callback - The row ID if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4571,7 +4522,7 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -4584,7 +4535,7 @@ declare namespace relationalStore { * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4597,7 +4548,7 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4633,7 +4584,7 @@ declare namespace relationalStore { * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4647,7 +4598,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4682,7 +4633,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4718,7 +4669,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4753,7 +4704,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - * The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -4768,7 +4719,7 @@ declare namespace relationalStore { * The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4783,7 +4734,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - * The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4820,7 +4771,7 @@ declare namespace relationalStore { * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -4835,7 +4786,7 @@ declare namespace relationalStore { * returns -1 otherwise. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -4850,7 +4801,7 @@ declare namespace relationalStore { * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4886,7 +4837,7 @@ declare namespace relationalStore { * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4924,7 +4875,7 @@ declare namespace relationalStore { * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4959,7 +4910,7 @@ declare namespace relationalStore { * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -4995,7 +4946,7 @@ declare namespace relationalStore { * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5010,7 +4961,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5025,7 +4976,7 @@ declare namespace relationalStore { * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5063,7 +5014,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5079,7 +5030,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5120,7 +5071,7 @@ declare namespace relationalStore { * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5135,7 +5086,7 @@ declare namespace relationalStore { * @returns { Promise } The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5150,7 +5101,7 @@ declare namespace relationalStore { * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5188,7 +5139,7 @@ declare namespace relationalStore { * @returns { Promise } The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5204,7 +5155,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5241,7 +5192,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5278,7 +5229,7 @@ declare namespace relationalStore { * the instance object of {@link dataSharePredicates.DataSharePredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5298,7 +5249,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5319,7 +5270,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5362,7 +5313,7 @@ declare namespace relationalStore { * the instance object of {@link dataSharePredicates.DataSharePredicates}. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5382,7 +5333,7 @@ declare namespace relationalStore { * @returns { Promise } The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5403,7 +5354,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5438,7 +5389,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5451,7 +5402,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5464,7 +5415,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5499,7 +5450,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5512,7 +5463,7 @@ declare namespace relationalStore { * @returns { Promise } return the number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5525,7 +5476,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @returns { Promise } return the number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5560,7 +5511,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @returns { number } return the number of rows deleted. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5595,7 +5546,7 @@ declare namespace relationalStore { * the instance object of {@link dataSharePredicates.DataSharePredicates}. * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5613,7 +5564,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5632,7 +5583,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5669,7 +5620,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5687,7 +5638,7 @@ declare namespace relationalStore { * @returns { Promise } The number of affected rows. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5706,7 +5657,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -5742,7 +5693,7 @@ declare namespace relationalStore { * The specified query condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5755,7 +5706,7 @@ declare namespace relationalStore { * The specified query condition by the instance object of {@link RdbPredicates}. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5774,7 +5725,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5788,7 +5739,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5803,7 +5754,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5821,7 +5772,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -5834,7 +5785,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -5848,7 +5799,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5866,7 +5817,7 @@ declare namespace relationalStore { * The specified query condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5885,7 +5836,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5906,7 +5857,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5927,7 +5878,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5952,7 +5903,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. @@ -5972,7 +5923,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -5996,7 +5947,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -6012,7 +5963,7 @@ declare namespace relationalStore { * @param { string } sql - Indicates the SQL statement to execute. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6024,7 +5975,7 @@ declare namespace relationalStore { * @param { string } sql - Indicates the SQL statement to execute. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -6042,7 +5993,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -6055,7 +6006,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6069,7 +6020,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -6087,7 +6038,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -6100,7 +6051,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6114,7 +6065,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -6132,7 +6083,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. @@ -6579,7 +6530,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The callback of executeSql. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6591,7 +6542,7 @@ declare namespace relationalStore { * @param { string } sql - Indicates the SQL statement to execute. * @param { AsyncCallback } callback - The callback of executeSql. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6628,7 +6579,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @param { AsyncCallback } callback - The callback of executeSql. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -6642,7 +6593,7 @@ declare namespace relationalStore { * @param { AsyncCallback } callback - The callback of executeSql. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6656,7 +6607,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @param { AsyncCallback } callback - The callback of executeSql. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6693,7 +6644,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -6707,7 +6658,7 @@ declare namespace relationalStore { * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6721,7 +6672,7 @@ declare namespace relationalStore { * Indicates the {@link ValueType} values of the parameters in the SQL statement. The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6758,7 +6709,7 @@ declare namespace relationalStore { * The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6794,7 +6745,7 @@ declare namespace relationalStore { * The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6829,7 +6780,7 @@ declare namespace relationalStore { * The values are strings. * @returns { ValueType } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -6859,7 +6810,7 @@ declare namespace relationalStore { /** * BeginTransaction before execute your sql. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -6868,7 +6819,7 @@ declare namespace relationalStore { * BeginTransaction before execute your sql. * * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -6877,7 +6828,7 @@ declare namespace relationalStore { /** * BeginTransaction before execute your sql. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -6909,7 +6860,7 @@ declare namespace relationalStore { * Begins a transaction before executing the SQL statement. * * @returns { Promise } Returns the transaction ID. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -6939,14 +6890,14 @@ declare namespace relationalStore { /** * Commit the the sql you have executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ /** * Commit the the sql you have executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -6954,7 +6905,7 @@ declare namespace relationalStore { /** * Commit the the sql you have executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -6987,7 +6938,7 @@ declare namespace relationalStore { * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7015,14 +6966,14 @@ declare namespace relationalStore { /** * Roll back the sql you have already executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ /** * Roll back the sql you have already executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 10 @@ -7030,7 +6981,7 @@ declare namespace relationalStore { /** * Roll back the sql you have already executed. * - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7062,7 +7013,8 @@ declare namespace relationalStore { * * @param { number } txId - Indicates the transaction ID which is obtained by beginTrans. * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7093,7 +7045,7 @@ declare namespace relationalStore { * @param { string } destName - Indicates the name that saves the database backup. * @param { AsyncCallback } callback - The callback of backup. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -7104,7 +7056,7 @@ declare namespace relationalStore { * @param { string } destName - Indicates the name that saves the database backup. * @param { AsyncCallback } callback - The callback of backup. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -7115,7 +7067,8 @@ declare namespace relationalStore { * * @param { string } destName - Indicates the name that saves the database backup. * @param { AsyncCallback } callback - The callback of backup. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -7148,7 +7101,7 @@ declare namespace relationalStore { * @param { string } destName - Indicates the name that saves the database backup. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -7159,7 +7112,7 @@ declare namespace relationalStore { * @param { string } destName - Indicates the name that saves the database backup. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -7171,7 +7124,7 @@ declare namespace relationalStore { * @param { string } destName - Indicates the name that saves the database backup. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7203,7 +7156,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @param { AsyncCallback } callback - The callback of restore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -7214,7 +7167,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @param { AsyncCallback } callback - The callback of restore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -7226,7 +7179,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @param { AsyncCallback } callback - The callback of restore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7258,7 +7211,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -7269,7 +7222,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -7281,7 +7234,7 @@ declare namespace relationalStore { * @param { string } srcName - Indicates the name that saves the database file. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7346,7 +7299,7 @@ declare namespace relationalStore { * @param { Array } tables - Indicates the table names you want to set. * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7359,7 +7312,7 @@ declare namespace relationalStore { * @param { Array } tables - Indicates the table names you want to set. * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7375,7 +7328,7 @@ declare namespace relationalStore { * @param { Array } tables - Indicates the table names you want to set. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7388,7 +7341,7 @@ declare namespace relationalStore { * @param { Array } tables - Indicates the table names you want to set. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7406,7 +7359,7 @@ declare namespace relationalStore { * This method only works when type equals to DistributedType.DISTRIBUTED_CLOUD * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800051 - The type of the distributed table does not match. * @throws { BusinessError } 801 - Capability not supported. @@ -7422,7 +7375,7 @@ declare namespace relationalStore { * ohos.permission.DISTRIBUTED_DATASYNC is required only when type is DISTRIBUTED_DEVICE. * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7443,7 +7396,7 @@ declare namespace relationalStore { * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800051 - The type of the distributed table does not match. * @throws { BusinessError } 801 - Capability not supported. @@ -7461,7 +7414,7 @@ declare namespace relationalStore { * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. * @param { AsyncCallback } callback - The callback of setDistributedTables. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7487,7 +7440,7 @@ declare namespace relationalStore { * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800051 - The type of the distributed table does not match. * @throws { BusinessError } 801 - Capability not supported. @@ -7505,7 +7458,7 @@ declare namespace relationalStore { * Indicates the distributed config of the tables. For details, see {@link DistributedConfig}. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7524,7 +7477,7 @@ declare namespace relationalStore { * @param { string } table - {string}: the distributed table name. * @param { AsyncCallback } callback * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7539,7 +7492,7 @@ declare namespace relationalStore { * @param { string } table - {string}: the distributed table name. * @param { AsyncCallback } callback * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7557,7 +7510,7 @@ declare namespace relationalStore { * @param { string } table * @returns { Promise } {string}: the distributed table name. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7572,7 +7525,7 @@ declare namespace relationalStore { * @param { string } table * @returns { Promise } {string}: the distributed table name. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7593,7 +7546,7 @@ declare namespace relationalStore { * {string}: device id, * {number}: device sync status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7611,7 +7564,7 @@ declare namespace relationalStore { * {string}: device id, * {number}: device sync status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7630,7 +7583,7 @@ declare namespace relationalStore { * @returns { Promise> } * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7646,7 +7599,7 @@ declare namespace relationalStore { * @returns { Promise> } * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7900,7 +7853,7 @@ declare namespace relationalStore { * If the value is empty array, the remote query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7917,7 +7870,7 @@ declare namespace relationalStore { * If the value is empty array, the remote query applies to all columns. * @param { AsyncCallback } callback - The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7943,7 +7896,7 @@ declare namespace relationalStore { * If the value is empty array, the remote query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -7960,7 +7913,7 @@ declare namespace relationalStore { * If the value is empty array, the remote query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -7979,7 +7932,7 @@ declare namespace relationalStore { * @param { Callback> } observer - * {Array}: the observer of data change events in the distributed database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -7995,7 +7948,7 @@ declare namespace relationalStore { * @param { Callback> } observer - * {Array}: the observer of data change events in the distributed database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -8016,7 +7969,7 @@ declare namespace relationalStore { * {Array}: The observer of data change events in the distributed database. * {Array}: The change info of data change events in the distributed database or the local database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 801 - Capability not supported. @@ -8036,7 +7989,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -8052,7 +8005,7 @@ declare namespace relationalStore { * Indicates whether it is an interprocess subscription or an in-process subscription. * @param { Callback } observer - The observer of data change events in the database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. * @throws { BusinessError } 14800000 - Inner error. @@ -8067,7 +8020,7 @@ declare namespace relationalStore { * Indicates whether it is an interprocess subscription or an in-process subscription. * @param { Callback } observer - The observer of data change events in the database. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8096,9 +8049,8 @@ declare namespace relationalStore { * @param { 'autoSyncProgress' } event - Indicates the event must be string 'autoSyncProgress'. * @param { Callback } progress - * Callback used to return the {@link ProgressDetails} result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Need 2 - 3 parameter(s)! 2. The RdbStore must be valid. - * 3. The event must be a not empty string. 4. The progress must be function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -8111,8 +8063,8 @@ declare namespace relationalStore { * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. * @param { Callback } observer - * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8124,8 +8076,8 @@ declare namespace relationalStore { * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. * @param { Callback } observer - * Indicates the callback used to return the SQL execution statistics {@link SqlExeInfo} in the database. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8167,7 +8119,7 @@ declare namespace relationalStore { * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. * @param { Callback> } observer - {Array}: the data change observer already registered. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 @@ -8180,7 +8132,7 @@ declare namespace relationalStore { * If its value is SUBSCRIBE_TYPE_REMOTE, ohos.permission.DISTRIBUTED_DATASYNC is required. * @param { Callback> } observer - {Array}: the data change observer already registered. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -8198,7 +8150,7 @@ declare namespace relationalStore { * {Array}: the data change observer already registered. * {Array}: the change info already registered. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 801 - Capability not supported. @@ -8217,7 +8169,7 @@ declare namespace relationalStore { * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -8237,7 +8189,7 @@ declare namespace relationalStore { * Indicates whether it is an interprocess subscription or an in-process subscription. * @param { Callback } observer - The data change observer already registered. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. * @throws { BusinessError } 14800000 - Inner error. @@ -8252,7 +8204,7 @@ declare namespace relationalStore { * Indicates whether it is an interprocess subscription or an in-process subscription. * @param { Callback } observer - The data change observer already registered. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8295,13 +8247,27 @@ declare namespace relationalStore { * Unsubscribes from the SQL statistics. * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. * @param { Callback } observer - Indicates the callback to unregister. - * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 */ + /** + * Unsubscribes from the SQL statistics. + * @param { 'statistics' } event - Indicates the event type, which must be 'statistics'. + * @param { Callback } observer - Indicates the callback to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800000 - Inner error. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + */ off(event: 'statistics', observer?: Callback ): void; /** @@ -8333,7 +8299,7 @@ declare namespace relationalStore { * * @param { string } event - Indicates the subscription event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800050 - Failed to obtain the subscription service. * @throws { BusinessError } 14800000 - Inner error. @@ -8345,7 +8311,7 @@ declare namespace relationalStore { * * @param { string } event - Indicates the subscription event. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8359,7 +8325,7 @@ declare namespace relationalStore { * Close the RdbStore and all resultSets. * * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 @@ -8368,7 +8334,7 @@ declare namespace relationalStore { * Close the RdbStore and all resultSets. * * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. The store must not be nullptr. + * @throws { BusinessError } 401 - Parameter error. Possible causes: The RdbStore verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform @@ -8384,7 +8350,7 @@ declare namespace relationalStore { * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. * @returns { Promise } Promise used to return the number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. @@ -8422,7 +8388,7 @@ declare namespace relationalStore { * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. * @returns { Promise } Promise used to return the number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. @@ -8459,7 +8425,7 @@ declare namespace relationalStore { * @param { number } waitTime - Indicates the maximum time allowed for detaching the database. * @returns { Promise } Return the current number of attached databases. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8491,7 +8457,7 @@ declare namespace relationalStore { * The specified lock condition by the instance object of {@link RdbPredicates}. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8525,7 +8491,7 @@ declare namespace relationalStore { * The specified Unlock condition by the instance object of {@link RdbPredicates}. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8560,7 +8526,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8638,14 +8604,12 @@ declare namespace relationalStore { * If valid cryptoParam passed, the cryptoParam is used to rekey. * If cryptoParam is null or not passed, the default cryptoParam is used. * @returns { Promise } - Promise that returns no value. - * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @throws { BusinessError } 14800015 - The database does not respond. * @throws { BusinessError } 14800021 - SQLite: Generic error. - * Possible causes: Insert failed or the updated data does not exist. * @throws { BusinessError } 14800023 - SQLite: Access permission denied. * @throws { BusinessError } 14800024 - SQLite: The database file is locked. * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. @@ -8657,6 +8621,22 @@ declare namespace relationalStore { * @since 20 */ rekey(cryptoParam?: CryptoParam): Promise; + + /** + * Support for collations in different languages. + * @param { string } locale - Language related to the locale. + * for example, zh. The value complies with the ISO 639 standard. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. + * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. + * @throws { BusinessError } 14800024 - SQLite: The database file is locked. + * @throws { BusinessError } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @since 20 + */ + setLocale(locale: string) : Promise } /** @@ -8714,7 +8694,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { Promise } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8744,7 +8724,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The row ID if the operation is successful. return -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8775,7 +8755,7 @@ declare namespace relationalStore { * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8805,7 +8785,7 @@ declare namespace relationalStore { * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8837,7 +8817,7 @@ declare namespace relationalStore { * @returns { Promise } The number of values that were inserted if the operation is successful. * returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8871,7 +8851,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The number of values that were inserted if the operation is successful. returns -1 otherwise. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8906,7 +8886,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8938,7 +8918,7 @@ declare namespace relationalStore { * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. * @returns { number } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8967,7 +8947,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @returns { Promise } return the number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -8996,7 +8976,7 @@ declare namespace relationalStore { * The specified delete condition by the instance object of {@link RdbPredicates}. * @returns { number } return the number of rows deleted. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -9026,7 +9006,7 @@ declare namespace relationalStore { * @param { Array } columns - The columns to query. If the value is null, the query applies to all columns. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -9052,7 +9032,7 @@ declare namespace relationalStore { * The columns to query. If the value is empty array, the query applies to all columns. * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -9078,7 +9058,7 @@ declare namespace relationalStore { * The values are strings. * @returns { Promise } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -9104,7 +9084,7 @@ declare namespace relationalStore { * The values are strings. * @returns { ResultSet } The {@link ResultSet} object if the operation is successful. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. @@ -9130,7 +9110,7 @@ declare namespace relationalStore { * The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -9158,7 +9138,7 @@ declare namespace relationalStore { * The values are strings. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -9189,7 +9169,7 @@ declare namespace relationalStore { * The values are strings. * @returns { ValueType } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported the sql(attach,begin,commit,rollback etc.). * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800011 - Failed to open the database because it is corrupted. @@ -9417,7 +9397,7 @@ declare namespace relationalStore { * @param { string } name - Indicates the database name. * @param { AsyncCallback } callback - The callback of deleteRdbStore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -9431,7 +9411,7 @@ declare namespace relationalStore { * @param { string } name - Indicates the database name. * @param { AsyncCallback } callback - The callback of deleteRdbStore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -9449,7 +9429,7 @@ declare namespace relationalStore { * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. * @param { AsyncCallback } callback - The callback of deleteRdbStore. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. @@ -9468,7 +9448,7 @@ declare namespace relationalStore { * @param { string } name - Indicates the database name. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -9482,7 +9462,7 @@ declare namespace relationalStore { * @param { string } name - Indicates the database name. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -9497,7 +9477,7 @@ declare namespace relationalStore { * @param { string } name - Indicates the database name. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core @@ -9515,7 +9495,7 @@ declare namespace relationalStore { * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. * @throws { BusinessError } 14801001 - The operation is supported in the stage model only. @@ -9533,7 +9513,7 @@ declare namespace relationalStore { * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800010 - Failed to open or delete the database by an invalid database path. @@ -9558,7 +9538,8 @@ declare namespace relationalStore { * check the {@link Tokenizer} tokenizer type is supported or not on current system. * @param { tokenizer } type - Indicates Tokenizer which want to check. * @returns { boolean } Returns {@code true} if the tokenizer is supported; returns {@code false} otherwise. - * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 18 */ @@ -9571,14 +9552,13 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Row of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. * @returns { SqlInfo } - Returns a SQL insert statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ function getInsertSqlInfo(table: string, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; - + /** * Obtains a SQL statement used for updating data. * @@ -9586,8 +9566,7 @@ declare namespace relationalStore { * @param { ValuesBucket } values - Row of data to be updated in the database. * @param { ConflictResolution } conflict - {@link ConflictResolution} to be used if conflicts occur. * @returns { SqlInfo } - Returns a SQL update statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -9599,22 +9578,20 @@ declare namespace relationalStore { * * @param { RdbPredicates } predicates - Conditions for deleting data. For details, see {@link RdbPredicates}. * @returns { SqlInfo } - Returns a SQL delete statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ function getDeleteSqlInfo(predicates: RdbPredicates):SqlInfo; - + /** * Obtains a SQL statement used for querying data. * * @param { RdbPredicates } predicates - Conditions for querying data. For details, see {@link RdbPredicates}. * @param { Array } columns - Columns to query. If this parameter is not specified, the query applies to all columns. * @returns { SqlInfo } - Returns a SQL query statement including parameters. - * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Empty conditions; - *
2. Missing GROUP BY clause. + * @throws { BusinessError } 14800001 - Invalid arguments. Possible causes: 1. Parameter is out of valid range. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -9622,4 +9599,4 @@ declare namespace relationalStore { function getQuerySqlInfo(predicates: RdbPredicates, columns?: Array):SqlInfo; } -export default relationalStore; +export default relationalStore; \ No newline at end of file diff --git a/api/@ohos.data.sendableRelationalStore.d.ets b/api/@ohos.data.sendableRelationalStore.d.ets index d296e90f04f96a42a171e49869d527e3d7419fed..d55582ee0efc3e8f2bfdeff57dda5b84ea8060aa 100644 --- a/api/@ohos.data.sendableRelationalStore.d.ets +++ b/api/@ohos.data.sendableRelationalStore.d.ets @@ -150,7 +150,7 @@ declare namespace sendableRelationalStore { * @returns { NonSendableBucket } a non-sendable valuesBucket object. For details, * see {@link NonSendableBucket}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types;3. Parameter verification failed. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 @@ -163,7 +163,7 @@ declare namespace sendableRelationalStore { * @param { NonSendableBucket } valuesBucket - Indicates the non-sendable valuesBucket object to convert. * @returns { ValuesBucket } a sendable valuesBucket object. For details, see {@link ValuesBucket}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types;3. Parameter verification failed. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 @@ -176,7 +176,7 @@ declare namespace sendableRelationalStore { * @param { Asset } asset - Indicates the sendable asset object to convert. * @returns { NonSendableAsset } a non-sendable asset object. For details, see {@link NonSendableAsset}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types;3. Parameter verification failed. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 @@ -189,7 +189,7 @@ declare namespace sendableRelationalStore { * @param { NonSendableAsset } asset - Indicates the non-sendable asset object to convert. * @returns { Asset } a sendable asset object. For details, see {@link Asset}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types;3. Parameter verification failed. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14800000 - Inner error. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 12 diff --git a/api/@ohos.deviceInfo.d.ets b/api/@ohos.deviceInfo.d.ets index 950c68220ee4ab5b7feab7bb31afd7ad72b3eeae..ebe9d6304509e649edc78352d94edbd526cb5629 100644 --- a/api/@ohos.deviceInfo.d.ets +++ b/api/@ohos.deviceInfo.d.ets @@ -1,6 +1,6 @@ /* * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * @file * @kit BasicServicesKit @@ -20,7 +21,7 @@ /** * A static class pertaining to the product information. * - * @namespace deviceInfo + * @class deviceInfo * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 20 @@ -41,6 +42,17 @@ declare class deviceInfo { */ static get deviceType(): string; + /** + * Obtains the device manufacturer represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get manufacture(): string; + /** * Obtains the external product series represented by a string. * @@ -51,6 +63,17 @@ declare class deviceInfo { * @arkts 1.2 */ static get brand(): string; + + /** + * Obtains the external product series represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get marketName(): string; /** * Obtains the product series represented by a string. @@ -75,6 +98,190 @@ declare class deviceInfo { */ static get productModel(): string; + /** + * Obtains the product model alias represented by a string. + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get productModelAlias(): string; + + /** + * Obtains the software model represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get softwareModel(): string; + + /** + * Obtains the hardware model represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get hardwareModel(): string; + + /** + * Obtains the hardware model represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get hardwareProfile(): string; + + /** + * Obtains the device serial number represented by a string. + * + * @permission ohos.permission.sec.ACCESS_UDID + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get serial(): string; + + /** + * Obtains the bootloader version number represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get bootloaderVersion(): string; + + /** + * Obtains the application binary interface (Abi) list represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get abiList(): string; + + /** + * Obtains the security patch level represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get securityPatchTag(): string; + + /** + * Obtains the product version represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get displayVersion(): string; + + /** + * Obtains the incremental version represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get incrementalVersion(): string; + + /** + * Obtains the OS release type represented by a string. + *

The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. + * The specific release type may be {@code Release}, {@code Beta1}, or others alike. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get osReleaseType(): string; + + + /** + * Obtains the OS version represented by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get osFullName(): string; + + /** + * Obtains the major (M) version number, which increases with any updates to the overall architecture. + *

The M version number monotonically increases from 1 to 99. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get majorVersion(): int; + + /** + * Obtains the senior (S) version number, which increases with any updates to the partial + * architecture or major features. + *

The S version number monotonically increases from 0 to 99. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get seniorVersion(): int; + + /** + * Obtains the feature (F) version number, which increases with any planned new features. + *

The F version number monotonically increases from 0 or 1 to 99. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get featureVersion(): int; + + /** + * Obtains the build (B) version number, which increases with each new development build. + *

The B version number monotonically increases from 0 or 1 to 999. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildVersion(): int; + + /** * Obtains the SDK API version number. * @@ -85,6 +292,157 @@ declare class deviceInfo { * @arkts 1.2 */ static get sdkApiVersion(): int; + + /** + * Obtains the first API version number. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get firstApiVersion(): int; + + /** + * Obtains the version ID by a string. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get versionId(): string; + + /** + * Obtains the build types of the same baseline code. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildType(): string; + + /** + * Obtains the different build user of the same baseline code. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildUser(): string; + + /** + * Obtains the different build host of the same baseline code. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildHost(): string; + + /** + * Obtains the build time. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildTime(): string; + + /** + * Obtains the version hash. + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get buildRootHash(): string; + + /** + * Obtains the device udid. + * + * @permission ohos.permission.sec.ACCESS_UDID + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get udid(): string; + + /** + * Obtains the Distribution OS name. + *

Independent Software Vendor (ISV) may distribute OHOS with their own OS name. + * distributionOsName will return the ISV OS name + * If ISV not specified, it will return an empty string + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get distributionOSName(): string; + + /** + * Obtains the Distribution OS version. + *

Independent Software Vendor (ISV) may distribute OHOS with their own OS version. + * distributionOSVersion will return the ISV OS version + * If ISV not specified, it will return the same value as osFullName + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get distributionOSVersion(): string; + + /** + * Obtains the Distribution OS version. + *

Independent Software Vendor (ISV) may distribute OHOS with their own OS api version. + * distributionOSVersion will return the ISV OS api version + * If ISV not specified, it will return the same value as sdkApiVersion + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get distributionOSApiVersion(): int; + + /** + * Obtains the Distribution OS api name. + *

Independent Software Vendor (ISV) may distribute OHOS with their own OS api name. + * distributionOSApiName will return the ISV OS api name + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get distributionOSApiName(): string; + + /** + * Obtains the Distribution OS release type. + *

Independent Software Vendor (ISV) may distribute OHOS with their own OS release type. + * distributionOSVersion will return the ISV OS release type + * If ISV not specified, it will return the same value as osReleaseType + * + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get distributionOSReleaseType(): string; /** * Open Device Identifier (ODID): a developer-level non-permanent device identifier. @@ -107,5 +465,34 @@ declare class deviceInfo { * @arkts 1.2 */ static get ODID(): string; + + /** + * Obtaining the hard drive serial number. + * + * @permission ohos.permission.ACCESS_DISK_PHY_INFO + * @syscap SystemCapability.Startup.SystemInfo + * @since 20 + * @arkts 1.2 + */ + static get diskSN(): string; + + /** + * Obtaining the hard drive chip type. + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 22 + * @arkts 1.2 + */ + static get chipType(): string; + + /** + * Obtaining the drive boot count. + * if get failed, it will be -1 + * + * @syscap SystemCapability.Startup.SystemInfo + * @since 22 + * @arkts 1.2 + */ + static get bootCount(): int; } export default deviceInfo; diff --git a/api/@ohos.deviceInfo.d.ts b/api/@ohos.deviceInfo.d.ts index 7f49b025981acb1ba7abd44dedb96fb3c4505ab5..5e3a45d3b3b2399cc018d2405130ad4b0104f1f9 100644 --- a/api/@ohos.deviceInfo.d.ts +++ b/api/@ohos.deviceInfo.d.ts @@ -119,7 +119,6 @@ declare namespace deviceInfo { * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ @@ -128,7 +127,6 @@ declare namespace deviceInfo { * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -138,7 +136,6 @@ declare namespace deviceInfo { * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @atomicservice @@ -149,13 +146,11 @@ declare namespace deviceInfo { /** * Obtains the device manufacturer represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the device manufacturer represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -165,14 +160,12 @@ declare namespace deviceInfo { /** * Obtains the device brand represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the device brand represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -180,7 +173,6 @@ declare namespace deviceInfo { */ /** * Obtains the device brand represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -209,14 +201,13 @@ declare namespace deviceInfo { /** * Obtains the product series represented by a string. * - * + * @constant * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the product series represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -226,14 +217,12 @@ declare namespace deviceInfo { /** * Obtains the product model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the product model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -241,7 +230,6 @@ declare namespace deviceInfo { /** * Obtains the product model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @atomicservice @@ -262,14 +250,12 @@ declare namespace deviceInfo { /** * Obtains the software model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the software model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -279,14 +265,12 @@ declare namespace deviceInfo { /** * Obtains the hardware model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the hardware model represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -296,7 +280,6 @@ declare namespace deviceInfo { /** * Obtains the hardware profile represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 * @deprecated since 9 @@ -316,14 +299,12 @@ declare namespace deviceInfo { /** * Obtains the bootloader version number represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the bootloader version number represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -339,7 +320,6 @@ declare namespace deviceInfo { */ /** * Obtains the application binary interface (Abi) list represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -349,7 +329,6 @@ declare namespace deviceInfo { /** * Obtains the security patch level represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @since 6 @@ -357,7 +336,6 @@ declare namespace deviceInfo { /** * Obtains the security patch level represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -367,14 +345,12 @@ declare namespace deviceInfo { /** * Obtains the product version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the product version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -384,14 +360,12 @@ declare namespace deviceInfo { /** * Obtains the incremental version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the incremental version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -403,7 +377,6 @@ declare namespace deviceInfo { *

The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. * The specific release type may be {@code Release}, {@code Beta1}, or others alike. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ @@ -412,7 +385,6 @@ declare namespace deviceInfo { *

The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. * The specific release type may be {@code Release}, {@code Beta1}, or others alike. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -422,13 +394,11 @@ declare namespace deviceInfo { /** * Obtains the OS version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the OS version represented by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -437,7 +407,6 @@ declare namespace deviceInfo { /** * Obtains the OS version represented by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @atomicservice @@ -449,14 +418,12 @@ declare namespace deviceInfo { * Obtains the major (M) version number, which increases with any updates to the overall architecture. *

The M version number monotonically increases from 1 to 99. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the major (M) version number, which increases with any updates to the overall architecture. *

The M version number monotonically increases from 1 to 99. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -468,7 +435,6 @@ declare namespace deviceInfo { * Obtains the senior (S) version number, which increases with any updates to the partial * architecture or major features. *

The S version number monotonically increases from 0 to 99. - * * * @syscap SystemCapability.Startup.SystemInfo * @since 6 @@ -478,7 +444,6 @@ declare namespace deviceInfo { * architecture or major features. *

The S version number monotonically increases from 0 to 99. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -489,7 +454,6 @@ declare namespace deviceInfo { * Obtains the feature (F) version number, which increases with any planned new features. *

The F version number monotonically increases from 0 or 1 to 99. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ @@ -497,7 +461,6 @@ declare namespace deviceInfo { * Obtains the feature (F) version number, which increases with any planned new features. *

The F version number monotonically increases from 0 or 1 to 99. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -508,7 +471,6 @@ declare namespace deviceInfo { * Obtains the build (B) version number, which increases with each new development build. *

The B version number monotonically increases from 0 or 1 to 999. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ @@ -516,7 +478,6 @@ declare namespace deviceInfo { * Obtains the build (B) version number, which increases with each new development build. *

The B version number monotonically increases from 0 or 1 to 999. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -526,13 +487,11 @@ declare namespace deviceInfo { /** * Obtains the SDK API version number. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the SDK API version number. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -541,7 +500,6 @@ declare namespace deviceInfo { /** * Obtains the SDK API version number. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @atomicservice @@ -552,13 +510,11 @@ declare namespace deviceInfo { /** * Obtains the first API version number. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the first API version number. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -568,7 +524,6 @@ declare namespace deviceInfo { /** * Obtains the version ID by a string. - * * * @syscap SystemCapability.Startup.SystemInfo * @since 6 @@ -576,7 +531,6 @@ declare namespace deviceInfo { /** * Obtains the version ID by a string. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -586,13 +540,11 @@ declare namespace deviceInfo { /** * Obtains the build types of the same baseline code. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the build types of the same baseline code. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -602,14 +554,12 @@ declare namespace deviceInfo { /** * Obtains the different build user of the same baseline code. - * * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the different build user of the same baseline code. - * * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform @@ -620,14 +570,12 @@ declare namespace deviceInfo { /** * Obtains the different build host of the same baseline code. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the different build host of the same baseline code. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -637,14 +585,12 @@ declare namespace deviceInfo { /** * Obtains the build time. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the build time. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -654,14 +600,12 @@ declare namespace deviceInfo { /** * Obtains the version hash. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 6 */ /** * Obtains the version hash. * - * * @syscap SystemCapability.Startup.SystemInfo * @crossplatform * @since 10 @@ -684,7 +628,6 @@ declare namespace deviceInfo { * distributionOsName will return the ISV OS name * If ISV not specified, it will return an empty string * - * * @syscap SystemCapability.Startup.SystemInfo * @since 10 */ @@ -695,7 +638,6 @@ declare namespace deviceInfo { *

Independent Software Vendor (ISV) may distribute OHOS with their own OS version. * distributionOSVersion will return the ISV OS version * If ISV not specified, it will return the same value as osFullName - * * * @syscap SystemCapability.Startup.SystemInfo * @since 10 @@ -707,7 +649,6 @@ declare namespace deviceInfo { *

Independent Software Vendor (ISV) may distribute OHOS with their own OS api version. * distributionOSVersion will return the ISV OS api version * If ISV not specified, it will return the same value as sdkApiVersion - * * * @syscap SystemCapability.Startup.SystemInfo * @since 10 @@ -729,7 +670,6 @@ declare namespace deviceInfo { *

Independent Software Vendor (ISV) may distribute OHOS with their own OS release type. * distributionOSVersion will return the ISV OS release type * If ISV not specified, it will return the same value as osReleaseType - * * * @syscap SystemCapability.Startup.SystemInfo * @since 10 @@ -751,7 +691,6 @@ declare namespace deviceInfo { * For apps from the same developer, which are running on different devices, each of them has its own ODID. * For apps from different developers, which are running on different devices, each of them has its own ODID. * - * * @syscap SystemCapability.Startup.SystemInfo * @since 12 */ @@ -810,27 +749,24 @@ declare namespace deviceInfo { */ const performanceClass: PerformanceClassLevel; - /** - * Obtains the SDK Minor api version. - * - * @type { number } + /** + * Obtains the device CPU chipType by a string. + * + * @type { string } * @syscap SystemCapability.Startup.SystemInfo - * @crossplatform - * @atomicservice - * @since 20 + * @since 21 */ - const sdkMinorApiVersion: number; + const chipType: string; - /** - * Obtains the SDK Patch api version. - * - * @type { number } - * @syscap SystemCapability.Startup.SystemInfo - * @crossplatform - * @atomicservice - * @since 20 - */ - const sdkPatchApiVersion: number; + /** + * Obtains the deviceboot count by a number + * if get failed, it will return -1 + * + * @type { number } + * @syscap SystemCapability.Startup.SystemInfo + * @since 21 + */ + const bootCount: number; } export default deviceInfo; diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts index 3e2172a826fab1458bd1c425cea538ceaddf448d..66cd26bd4dbd3d4cb0f41879eca4ed19d524d5cc 100644 --- a/api/@ohos.display.d.ts +++ b/api/@ohos.display.d.ts @@ -98,7 +98,7 @@ declare namespace display { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getDefaultDisplaySync(): Display; + function getDefaultDisplaySync(): Display; /** * Obtain the primary display. For devices other than 2in1 devices, the Display object obtained is the built-in screen. @@ -127,7 +127,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getDisplayByIdSync(displayId: number): Display; + function getDisplayByIdSync(displayId: number): Display; /** * Obtain all displays. @@ -138,7 +138,7 @@ declare namespace display { * @deprecated since 9 * @useinstead ohos.display#getAllDisplays */ - export function getAllDisplay(callback: AsyncCallback>): void; + function getAllDisplay(callback: AsyncCallback>): void; /** * Obtain all displays. @@ -169,7 +169,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getAllDisplays(callback: AsyncCallback>): void; + function getAllDisplays(callback: AsyncCallback>): void; /** * Obtain all displays. @@ -186,7 +186,8 @@ declare namespace display { * @throws { BusinessError } 1400001 - Invalid display or screen. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllDisplays(): Promise>; @@ -200,7 +201,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getAllDisplayPhysicalResolution(): Promise>; + function getAllDisplayPhysicalResolution(): Promise>; /** * Check whether there is a privacy window on the current display. @@ -216,7 +217,7 @@ declare namespace display { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - export function hasPrivateWindow(displayId: number): boolean; + function hasPrivateWindow(displayId: number): boolean; /** * Register the callback for display changes. @@ -249,10 +250,10 @@ declare namespace display { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'add' | 'remove' | 'change', callback: Callback): void; + function on(type: 'add' | 'remove' | 'change', callback: Callback): void; /** * Unregister the callback for display changes. @@ -279,16 +280,16 @@ declare namespace display { * Unregister the callback for display changes. * * @param { 'add' | 'remove' | 'change' } type the event of display change event - * @param { Callback } callback the display id of changed + * @param { Callback } [callback] the display id of changed * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; + function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; /** * Register the callback for private mode changes. @@ -303,7 +304,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function on(type: 'privateModeChange', callback: Callback): void; + function on(type: 'privateModeChange', callback: Callback): void; /** * Unregister the callback for private mode changes. @@ -318,7 +319,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function off(type: 'privateModeChange', callback?: Callback): void; + function off(type: 'privateModeChange', callback?: Callback): void; /** * Check whether the device is foldable. @@ -345,10 +346,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function isFoldable(): boolean; + function isFoldable(): boolean; /** * Get the current fold status of the foldable device. @@ -375,10 +376,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function getFoldStatus(): FoldStatus; + function getFoldStatus(): FoldStatus; /** * Register the callback for fold status changes. @@ -414,10 +415,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'foldStatusChange', callback: Callback): void; + function on(type: 'foldStatusChange', callback: Callback): void; /** * Unregister the callback for fold status changes. @@ -446,17 +447,17 @@ declare namespace display { * Unregister the callback for fold status changes. * * @param { 'foldStatusChange' } type the event of fold status changes - * @param { Callback } callback Callback used to return the current fold status of device + * @param { Callback } [callback] Callback used to return the current fold status of device * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'foldStatusChange', callback?: Callback): void; + function off(type: 'foldStatusChange', callback?: Callback): void; /** * Register the callback for fold angle changes. @@ -464,14 +465,27 @@ declare namespace display { * @param { 'foldAngleChange' } type the event of fold angle changes. * @param { Callback> } callback Callback used to return the current fold angle of device. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Register the callback for fold angle changes. + * + * @param { 'foldAngleChange' } type the event of fold angle changes. + * @param { Callback> } callback Callback used to return the current fold angle of device. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'foldAngleChange', callback: Callback>): void; + function on(type: 'foldAngleChange', callback: Callback>): void; /** * Unregister the callback for fold angle changes. @@ -479,14 +493,27 @@ declare namespace display { * @param { 'foldAngleChange' } type the event of fold angle changes. * @param { Callback> } callback Callback used to return the current fold angle of device. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Unregister the callback for fold angle changes. + * + * @param { 'foldAngleChange' } type the event of fold angle changes. + * @param { Callback> } [callback] Callback used to return the current fold angle of device. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'foldAngleChange', callback?: Callback>): void; + function off(type: 'foldAngleChange', callback?: Callback>): void; /** * Register the callback for device capture, casting, or recording status changes. @@ -501,7 +528,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function on(type: 'captureStatusChange', callback: Callback): void; + function on(type: 'captureStatusChange', callback: Callback): void; /** * Unregister the callback for device capture, casting, or recording status changes. @@ -516,7 +543,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function off(type: 'captureStatusChange', callback?: Callback): void; + function off(type: 'captureStatusChange', callback?: Callback): void; /** @@ -529,7 +556,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function isCaptured(): boolean; + function isCaptured(): boolean; /** * Get the display mode of the foldable device. @@ -546,10 +573,20 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Get the display mode of the foldable device. + * + * @returns { FoldDisplayMode } display mode of the foldable device. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function getFoldDisplayMode(): FoldDisplayMode; + function getFoldDisplayMode(): FoldDisplayMode; /** * Change the display mode of the foldable device. @@ -564,7 +601,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function setFoldDisplayMode(mode: FoldDisplayMode): void; + function setFoldDisplayMode(mode: FoldDisplayMode): void; /** * Change the display mode of the foldable device. @@ -578,7 +615,7 @@ declare namespace display { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - export function setFoldDisplayMode(mode: FoldDisplayMode, reason: string): void; + function setFoldDisplayMode(mode: FoldDisplayMode, reason: string): void; /** * Register the callback for fold display mode changes. @@ -586,7 +623,7 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @since 10 @@ -597,14 +634,27 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Register the callback for fold display mode changes. + * + * @param { 'foldDisplayModeChange' } type the event of fold display mode changes + * @param { Callback } callback Callback used to return the current fold display mode + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'foldDisplayModeChange', callback: Callback): void; + function on(type: 'foldDisplayModeChange', callback: Callback): void; /** * Unregister the callback for fold display mode changes. @@ -612,7 +662,7 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @since 10 @@ -623,14 +673,27 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Unregister the callback for fold display mode changes. + * + * @param { 'foldDisplayModeChange' } type the event of fold display mode changes + * @param { Callback } [callback] Callback used to return the current fold display mode + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'foldDisplayModeChange', callback?: Callback): void; + function off(type: 'foldDisplayModeChange', callback?: Callback): void; /** * Get the fold crease region in the current display mode. @@ -650,7 +713,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getCurrentFoldCreaseRegion(): FoldCreaseRegion; + function getCurrentFoldCreaseRegion(): FoldCreaseRegion; /** * set fold status locked or not. @@ -665,7 +728,7 @@ declare namespace display { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - export function setFoldStatusLocked(locked: boolean): void; + function setFoldStatusLocked(locked: boolean): void; /** * Create virtual screen. @@ -852,14 +915,16 @@ declare namespace display { } /** - * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom, the hinges are identified from right to left as the first and second fold axes, respectively. + * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom, + * the hinges are identified from right to left as the first and second fold axes, respectively. * * @enum { number } * @syscap SystemCapability.Window.SessionManager * @since 10 */ /** - * Enumerates the fold status.For dual-fold axis devices, when oriented with the charging port at the bottom, the hinges are identified from right to left as the first and second fold axes, respectively. + * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom, + * the hinges are identified from right to left as the first and second fold axes, respectively. * * @enum { number } * @syscap SystemCapability.Window.SessionManager @@ -867,16 +932,17 @@ declare namespace display { * @since 12 */ /** - * Enumerates the fold status. + * Enumerates the fold status. For dual-fold axis devices, when oriented with the charging port at the bottom, + * the hinges are identified from right to left as the first and second fold axes, respectively. * * @enum { number } * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export enum FoldStatus { + enum FoldStatus { /** * Fold Status Unknown. * @@ -896,30 +962,33 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ FOLD_STATUS_UNKNOWN = 0, /** - * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open, and the second fold axis is folded. + * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open, + * and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @since 10 */ /** - * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open, and the second fold axis is folded. + * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open, + * and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ /** - * Fold Status Expanded. + * Fold Status Expanded. For dual-fold axis devices, the first fold axis is fully open, + * and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ FOLD_STATUS_EXPANDED = 1, @@ -939,25 +1008,28 @@ declare namespace display { */ FOLD_STATUS_FOLDED = 2, /** - * Fold Status Half Folded, somehow between fully open and completely closed. For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded. + * Fold Status Half Folded. Somehow between fully open and completely closed. + * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @since 10 */ /** - * Fold Status Half Folded, somehow between fully open and completely closed. For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded. + * Fold Status Half Folded. Somehow between fully open and completely closed. + * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ /** - * Fold Status Half Folded. + * Fold Status Half Folded. Somehow between fully open and completely closed. + * For dual-fold axis devices, the first fold axis is half-folded, and the second fold axis is folded. * * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ FOLD_STATUS_HALF_FOLDED = 3, @@ -1039,10 +1111,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export enum FoldDisplayMode { + enum FoldDisplayMode { /** * Unknown Display. * @@ -1136,7 +1208,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export enum DisplayState { + enum DisplayState { /** * Unknown. * @@ -1433,7 +1505,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface FoldCreaseRegion { + interface FoldCreaseRegion { /** * The display ID is used to identify the screen where the crease is located. * @@ -1581,7 +1653,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface WaterfallDisplayAreaRects { + interface WaterfallDisplayAreaRects { /** * Indicates the size of left side curved area of the waterfall screen. * @@ -1679,7 +1751,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface CutoutInfo { + interface CutoutInfo { /** * Bounding rectangles of the cutout areas of the display. * @@ -1731,7 +1803,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface DisplayPhysicalResolution { + interface DisplayPhysicalResolution { /** * fold display mode. * @@ -1793,7 +1865,7 @@ declare namespace display { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface Display { + interface Display { /** * Display ID. * @@ -2108,7 +2180,7 @@ declare namespace display { * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ xDPI: number; @@ -2136,6 +2208,7 @@ declare namespace display { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ yDPI: number; @@ -2162,7 +2235,8 @@ declare namespace display { * @type { Array } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ colorSpaces: Array; @@ -2179,7 +2253,8 @@ declare namespace display { * @type { Array } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ hdrFormats: Array; @@ -2258,7 +2333,8 @@ declare namespace display { * @throws { BusinessError } 1400001 - Invalid display or screen. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getCutoutInfo(): Promise; @@ -2302,6 +2378,17 @@ declare namespace display { */ getAvailableArea(): Promise; + /** + * Get the live crease region in the current display mode. + * + * @returns { FoldCreaseRegion } Fold crease region in the current display mode. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @since 20 + */ + getLiveCreaseRegion(): FoldCreaseRegion; + /** * Register the callback for available area changes. * diff --git a/api/@ohos.distributedHardware.mechanicManager.d.ts b/api/@ohos.distributedHardware.mechanicManager.d.ts deleted file mode 100644 index f9ab1d705722d80856dd5a6fe6d746e16f9ebd2f..0000000000000000000000000000000000000000 --- a/api/@ohos.distributedHardware.mechanicManager.d.ts +++ /dev/null @@ -1,883 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"), - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit MechanicKit - * @arkts 1.1&1.2 - */ - -import type { Callback } from './@ohos.base'; - -/** - * Provides capabilities for controlling and interacting with mechanical devices connected to this device. - * The capabilities cover connection management, control, and monitoring. - * - * @namespace mechanicManager - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - -declare namespace mechanicManager { - - /** - * Subscribes to device attachment state change events. - * @param { 'attachStateChange' } type Event type. - * @param { Callback } callback Callback used to return the state change. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function on(type: 'attachStateChange', callback: Callback): void; - - /** - * Unsubscribes from device attachment state change events. - * @param { 'attachStateChange' } type Event type. - * @param { Callback } [callback] Callback used to return the state change. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function off(type: 'attachStateChange', callback?: Callback): void; - - /** - * Obtain the list of connected mechanical devices. - * @returns { MechInfo[] } List of connected mechanical devices. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function getAttachedMechDevices(): MechInfo[]; - - /** - * Sets a user operation. - * @param { Operation } operation Operation type. - * @param { string } mac MAC address. - * @param { string } params Operation parameters. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function setUserOperation(operation: Operation, mac: string, params: string): void; - - /** - * Enables or disables camera tracking. - * @param { boolean } isEnabled Whether to enable camera tracking. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @throws { BusinessError } 33300003 - Device not supported. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - - function setCameraTrackingEnabled(isEnabled: boolean): void; - - /** - * Checks whether camera tracking is enabled for this mechanical device. - * @returns { boolean } Enabled status. The value true means that camera tracking is enabled, and false means - * the opposite. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - - function getCameraTrackingEnabled(): boolean; - - /** - * Subscribes to tracking events. - * @param { 'trackingStateChange' } type Event type. - * @param { Callback } callback Callback used to return the tracking event information. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function on(type: 'trackingStateChange', callback: Callback): void; - - /** - * Unsubscribes from tracking events. - * @param { 'trackingStateChange' } type Event type. - * @param { Callback } [callback] Callback used to return the tracking event information. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function off(type: 'trackingStateChange', callback?: Callback): void; - - /** - * Sets the camera tracking layout for this mechanical device. - * @param { CameraTrackingLayout } trackingLayout Camera tracking layout. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @throws { BusinessError } 33300003 - Device not supported. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - function setCameraTrackingLayout(trackingLayout: CameraTrackingLayout): void; - - /** - * Obtains the camera tracking layout of this mechanical device. - * @returns { CameraTrackingLayout } Camera tracking layout obtained. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - function getCameraTrackingLayout(): CameraTrackingLayout; - - /** - * Rotates a mechanical device to the relative angles. - * @param { number } mechId ID of the mechanical device. - * @param { RotationAngles } angles Relative angles. - * @param { number } duration Rotation duration. Unit: millisecond. - * @returns { Promise } Promise that return the execution result. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - function rotate(mechId: number, angles: RotationAngles, duration: number): Promise; - - /** - * Rotates a mechanical device to the absolute angles. - * @param { number } mechId ID of the mechanical device. - * @param { EulerAngles } angles Absolute angles. - * @param { number } duration Rotation duration. Unit: millisecond. - * @returns { Promise } Promise that return the execution result. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - function rotateToEulerAngles(mechId: number, angles: EulerAngles, duration: number): Promise; - - /** - * Obtains the maximum continuous rotation duration of a mechanical device. - * - * @param { number } mechId ID of the mechanical device. - * @returns { number } Maximum rotation duration. Unit: millisecond. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function getMaxRotationTime(mechId: number): number; - - /** - * Obtains the maximum rotation speed of a mechanical device. - * - * @param { number } mechId ID of the mechanical device. - * @returns { RotationSpeed } Maximum speed. Only the absolute value of the speed is returned. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function getMaxRotationSpeed(mechId: number): RotationSpeed; - - /** - * Rotates a mechanical device at the specified speed. - * @param { number } mechId ID of the mechanical device. - * @param { RotationSpeed } speed Rotation speed. - * @param { number } duration Rotation duration. Unit: millisecond. - * @returns { Promise } Promise that return the execution result. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function rotateBySpeed(mechId: number, speed: RotationSpeed, duration: number): Promise; - - /** - * Stops a mechanical device from moving. - * @param { number } mechId ID of the mechanical device. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function stopMoving(mechId: number): Promise; - - /** - * Obtains the current angles of a mechanical device. - * @param { number } mechId ID of the mechanical device. - * @returns { EulerAngles } Rotation angles. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - function getCurrentAngles(mechId: number): EulerAngles; - - /** - * Obtains the maximum rotation angles relative to the reference point for the specified mechanical device. - * - * @param { number } mechId ID of the mechanical device. - * @returns { RotationLimits } Maximum rotation angles. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - function getRotationLimits(mechId: number): RotationLimits; - - /** - * Obtains the status of the rotation axes. - * @param { number } mechId ID of the mechanical device. - * @returns { RotationAxesStatus } Rotation axis status. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @throws { BusinessError } 33300002 - Device not connected. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function getRotationAxesStatus(mechId: number): RotationAxesStatus; - - - /** - * Register a listener for axis state changes. - * The status of the rotation axis changes dynamically, which needs to be monitored. - * - * @param { 'rotationAxesStatusChange' } type - Event type. - * @param { Callback } callback - Rotate axis state changes callback. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function on(type: 'rotationAxesStatusChange', callback: Callback): void; - - /** - * Unregister a listener for axis state changes. - * - * @param { 'rotationAxesStatusChange' } type - Event type. - * @param { Callback } [callback] - Rotate axis state changes callback. - * @throws { BusinessError } 202 - Not system application. - * @throws { BusinessError } 33300001 - Service exception. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - function off(type: 'rotationAxesStatusChange', callback?: Callback): void; - - /** - * Mechanical device information. - * @typedef MechInfo - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - export interface MechInfo { - /** - * ID of the mechanical device. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - mechId: number; - - - /** - * Type of the mechanical device. - * @type { MechDeviceType } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - mechDeviceType: MechDeviceType; - - /** - * Name of the mechanical device. - * @type { string } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - mechName: string; - } - - - /** - * The rotion angles, relative to the current position. - * @typedef RotationAngles - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export interface RotationAngles { - /** - * Yaw angle, ranging from -2π to 2*π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - yaw?: number; - - /** - * Roll angle, ranging from -2π to 2*π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - roll?: number; - - /** - * Pitch angle, ranging from -2π to 2*π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - pitch?: number; - } - - /** - * Absolute euler angles relative to the home position. - * - * @typedef EulerAngles - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export interface EulerAngles { - /** - * Yaw angle, ranging from -π to π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - yaw?: number; - - /** - * Roll angle, ranging from -π to π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - roll?: number; - - /** - * Pitch angle, ranging from -π to π, measured in radians. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - pitch?: number; - } - - /** - * Rotational speed. A negative value indicates a clockwise rotation, and a positive value indicates a - * counterclockwise rotation. - * @typedef RotationSpeed - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - export interface RotationSpeed { - /** - * Yaw speed, measured in radians per second. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - yawSpeed?: number; - - /** - * Roll speed, measured in radians per second. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - rollSpeed?: number; - - /** - * Pitch speed, measured in radians per second. - * @type { ?number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - pitchSpeed?: number; - } - - - /** - * Rotation angle limits relative to the reference point. - * @typedef RotationLimits - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - - export interface RotationLimits { - /** - * Maximum yaw rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. - * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - negativeYawMax: number; - - /** - * Maximum yaw rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. - * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - positiveYawMax: number; - - /** - * Maximum roll rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. - * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - negativeRollMax: number; - - /** - * Maximum roll rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. - * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - positiveRollMax: number; - - /** - * Maximum pitch rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. - * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - negativePitchMax: number; - - /** - * Maximum pitch rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. - * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - positivePitchMax: number; - } - - /** - * Rotation axes status - * - * @typedef RotationAxesStatus - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export interface RotationAxesStatus { - /** - * Whether the yaw axis is enabled. - * @type { boolean } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - yawEnabled: boolean; - - /** - * Whether the roll axis is enabled. - * @type { boolean } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - rollEnabled: boolean; - - /** - * Whether the pitch axis is enabled. - * @type { boolean } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - pitchEnabled: boolean; - - /** - * Whether the yaw axis is limited. - * @type { ?RotationAxisLimited } RotationAxisLimited - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - yawLimited?: RotationAxisLimited; - - /** - * Whether the roll axis is limited. - * @type { ?RotationAxisLimited } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - rollLimited?: RotationAxisLimited; - - /** - * Whether the pitch axis is limited. - * @type { ?RotationAxisLimited } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - pitchLimited?: RotationAxisLimited; - } - - /** - * Enumerates the rotation axis limit states. - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export enum RotationAxisLimited { - /** - * Not limited. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - NOT_LIMITED = 0, - - /** - * Negative limited. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - NEGATIVE_LIMITED = 1, - - /** - * Positive limited. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - POSITIVE_LIMITED = 2, - } - - /** - * Rotation axes state change information. - * @typedef RotationAxesStateChangeInfo - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export interface RotationAxesStateChangeInfo { - /** - * ID of the mechanical device. - * @type { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - mechId: number; - - /** - * Rotate axis status. - * @type { RotationAxesStatus } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - status: RotationAxesStatus, - } - - /** - * Tracking event callback info. - * - * @typedef TrackingEventInfo - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - export interface TrackingEventInfo { - /** - * Tracking event. - * @type { TrackingEvent } Tracking event. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - event: TrackingEvent; - } - - /** - * Callback information about the device attachment state change. - * @typedef AttachStateChangeInfo - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - export interface AttachStateChangeInfo { - - /** - * Device attachment state. - * @type { AttachState } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - state: AttachState; - - /** - * Mechanical device information. - * @type { MechInfo } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - mechInfo: MechInfo, - } - - /** - * Enumerates the user operations. - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export enum Operation { - /** - * Connection operation. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - CONNECT = 0, - - /** - * Disconnection operation. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - DISCONNECT = 1 - } - - /** - * Enumerates the tracking events. - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - - export enum TrackingEvent { - /** - * Camera tracking enabled by user. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - CAMERA_TRACKING_USER_ENABLED = 0, - - /** - * Camera tracking disabled by user. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - CAMERA_TRACKING_USER_DISABLED = 1, - - /** - * Camera tracking layout changed. You can call getCameraTrackingLayout to obtain the new layout. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - CAMERA_TRACKING_LAYOUT_CHANGED = 2, - } - - /** - * Rotation execution results. - * - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export enum Result { - /** - * Rotation completed. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - COMPLETED = 0, - - /** - * Rotation was interrupted. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - INTERRUPTED = 1, - - /** - * Device reached limitation. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - LIMITED = 2, - - /** - * Rotation time out. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - TIMEOUT = 3, - - /** - * Rotation failed due to system error. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - SYSTEM_ERROR = 100 - } - - /** - * Enumerates the mechanical device types. - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - - export enum MechDeviceType { - /** - * Gimbal device. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - - GIMBAL_DEVICE = 0 - } - - /** - * Device attach states. - * - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - export enum AttachState { - - /** - * Device attached. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - ATTACHED = 0, - - /** - * Device detached. - * @syscap SystemCapability.Mechanic.Core - * @since 20 - */ - DETACHED = 1 - } - - /** - * Enumerates the camera tracking layouts. - * @enum { number } - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - export enum CameraTrackingLayout { - /** - * Default layout. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - DEFAULT = 0, - - /** - * Left-side layout. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - LEFT = 1, - - /** - * Middle layout. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - MIDDLE = 2, - - /** - * Right-side layout. - * @syscap SystemCapability.Mechanic.Core - * @systemapi - * @since 20 - */ - RIGHT = 3 - } - -} - -export default mechanicManager; \ No newline at end of file diff --git a/api/@ohos.distributedsched.linkEnhance.d.ts b/api/@ohos.distributedsched.linkEnhance.d.ts index 88415324be4ed3e85d7485fca49ab129f763e76f..2e6f4b44a65a09c48020594c35c59337b20d44af 100644 --- a/api/@ohos.distributedsched.linkEnhance.d.ts +++ b/api/@ohos.distributedsched.linkEnhance.d.ts @@ -173,7 +173,7 @@ declare namespace linkEnhance { * @returns { Server } Returns a server instance {@code Server}. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 32390206 - Invalid parameter. - * @throws { BusinessError } 32390203 - Duplicate server name. + * @throws { BusinessError } 32390203 - Duplicate server name. * @syscap SystemCapability.DistributedSched.AppCollaboration * @since 20 */ diff --git a/api/@ohos.dlpPermission.d.ts b/api/@ohos.dlpPermission.d.ts index 102a58f4561be2f152979f8d847ba3da80e0ab1c..3c2318ffaa7d6b7ad6fe906cdc1f24964d614e2a 100644 --- a/api/@ohos.dlpPermission.d.ts +++ b/api/@ohos.dlpPermission.d.ts @@ -874,7 +874,7 @@ declare namespace dlpPermission { * @systemapi Hide this for inner system use. * @since 10 */ - DOMAIN_ACCOUNT = 2, + DOMAIN_ACCOUNT = 2 } /** @@ -1018,8 +1018,7 @@ declare namespace dlpPermission { expireTime?: number; /** - * Action type when the DLP file exceed expire time. - * + * Defines the action to perform when the DLP file has expired. * @type { ?ActionType } * @syscap SystemCapability.Security.DataLossPrevention * @systemapi Hide this for inner system use. @@ -1467,15 +1466,15 @@ declare namespace dlpPermission { */ function getSandboxAppConfig(): Promise; - /** - * Checks whether the current system provides the DLP feature. This method uses a promise to return the result. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 19100011 - The system ability works abnormally. - * @syscap SystemCapability.Security.DataLossPrevention - * @since 12 - */ - function isDLPFeatureProvided(): Promise; + /** + * Checks whether the current system provides the DLP feature. This method uses a promise to return the result. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 19100011 - The system ability works abnormally. + * @syscap SystemCapability.Security.DataLossPrevention + * @since 12 + */ + function isDLPFeatureProvided(): Promise; /** * Enumerates the action types when exceed expiry time. @@ -1486,7 +1485,7 @@ declare namespace dlpPermission { */ export enum ActionType { /** - * NOT_OPEN, which not allows DLP files to be opened exceed expire time. + * NOT_OPEN, which not allows DLP files to be opened exceed expiry time. * @syscap SystemCapability.Security.DataLossPrevention * @systemapi Hide this for inner system use. * @since 20 @@ -1494,7 +1493,7 @@ declare namespace dlpPermission { NOT_OPEN = 0, /** - * OPEN, which allows DLP files to be opened exceed expire time. + * OPEN, which allows DLP files to be opened exceed expiry time. * @syscap SystemCapability.Security.DataLossPrevention * @systemapi Hide this for inner system use. * @since 20 @@ -1503,7 +1502,7 @@ declare namespace dlpPermission { } /** - * Represent the DLP file Custom property. + * Represents the DLP file Custom property. * * @interface CustomProperty * @syscap SystemCapability.Security.DataLossPrevention @@ -1512,7 +1511,7 @@ declare namespace dlpPermission { */ export interface CustomProperty { /** - * User defined information for enterprise space + * User defined information for enterprise space. * * @type { string } * @syscap SystemCapability.Security.DataLossPrevention @@ -1523,7 +1522,7 @@ declare namespace dlpPermission { } /** - * Generates a DLP file. This method uses a promise to return the result. + * Generates a DLP file. * * @permission ohos.permission.ENTERPRISE_ACCESS_DLP_FILE * @param { number } plaintextFd - FD of the file in plaintext. @@ -1548,11 +1547,11 @@ declare namespace dlpPermission { function generateDlpFileForEnterprise(plaintextFd: number, dlpFd: number, property: DLPProperty, customProperty: CustomProperty): Promise; /** - * Queries the DLP policy. This method uses a promise to return the result. + * Queries the DLP file policy. * * @permission ohos.permission.ENTERPRISE_ACCESS_DLP_FILE - * @param { number } dlpFd - Indicates the file descriptor of the DLP file. - * @returns { Promise }. + * @param { number } dlpFd FD of the target DLP file. + * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 19100001 - Invalid parameter value. @@ -1571,12 +1570,12 @@ declare namespace dlpPermission { function queryDlpPolicy(dlpFd: number): Promise; /** - * Decrypts a DLP file. This method uses a promise to return the result. + * Decrypts a DLP file. This API uses a promise to return the result. * * @permission ohos.permission.ENTERPRISE_ACCESS_DLP_FILE - * @param { number } dlpFd - Indicates the file descriptor of the DLP file. - * @param { number } plaintextFd - Indicates the file descriptor of the file in plaintext. - * @returns { Promise }. + * @param { number } dlpFd FD of the target DLP file. + * @param { number } plaintextFd FD of the target DLP file. + * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 19100001 - Invalid parameter value. diff --git a/api/@ohos.driver.deviceManager.d.ts b/api/@ohos.driver.deviceManager.d.ts index 86be9a130bb65a9a972b6dde00767d8960fa2bd0..df0effd0de7826ffcd4d7fb5d8d187383823b446 100644 --- a/api/@ohos.driver.deviceManager.d.ts +++ b/api/@ohos.driver.deviceManager.d.ts @@ -26,21 +26,23 @@ import type rpc from './@ohos.rpc'; * * @namespace deviceManager * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace deviceManager { /** * Query the external device list. * * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER - * @param { number } busType - The bus type of device to be queried. + * @param { int } busType - The bus type of device to be queried. * @returns { Array> } External device list. * @throws { BusinessError } 201 - The permission check failed. * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception or busType parameter error. * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function queryDevices(busType?: number): Array>; + function queryDevices(busType?: int): Array>; /** * Bind the device based on the device information returned by queryDevices(). @@ -57,7 +59,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 10 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#bindDriverWithDeviceId */ function bindDevice(deviceId: number, onDisconnect: AsyncCallback, @@ -78,7 +80,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 11 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#bindDriverWithDeviceId */ function bindDeviceDriver(deviceId: number, onDisconnect: AsyncCallback, @@ -99,7 +101,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 10 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#bindDriverWithDeviceId */ function bindDevice(deviceId: number, onDisconnect: AsyncCallback): Promise<{deviceId: number; @@ -119,7 +121,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 11 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#bindDriverWithDeviceId */ function bindDeviceDriver(deviceId: number, onDisconnect: AsyncCallback): Promise; @@ -135,7 +137,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 10 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#unbindDriverWithDeviceId */ function unbindDevice(deviceId: number, callback: AsyncCallback): void; @@ -152,7 +154,7 @@ declare namespace deviceManager { * @throws { BusinessError } 22900001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @since 10 - * @deprecated since 19 + * @deprecated since 18 * @useinstead ohos.driver.deviceManager/deviceManager#unbindDriverWithDeviceId */ function unbindDevice(deviceId: number): Promise; @@ -161,7 +163,7 @@ declare namespace deviceManager { * Queries external device information. * * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER - * @param { number } deviceId - ID of device to query. + * @param { long } deviceId - ID of device to query. * @returns { Array> } Device information obtained. * @throws { BusinessError } 201 - The permission check failed. * @throws { BusinessError } 202 - Permission denied. A non-system application cannot call a system API. @@ -169,9 +171,10 @@ declare namespace deviceManager { * @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function queryDeviceInfo(deviceId?: number): Array>; + function queryDeviceInfo(deviceId?: long): Array>; /** * Queries driver information. @@ -185,53 +188,58 @@ declare namespace deviceManager { * @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryDriverInfo(driverUid?: string): Array>; - /** - * Bind the device based on the device information returned by queryDevices(). - * - * @permission ohos.permission.ACCESS_DDK_DRIVERS - * @param { number } deviceId - Device id on the device list returned by queryDevices(). - * @param { AsyncCallback } onDisconnect - Callback is invoked when device is disconnected after bind - * success. - * @returns { Promise } Indicates the bind result including device ID and remote object. - * @throws { BusinessError } 201 - The permission check failed. - * @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. - * @throws { BusinessError } 26300002 - The driver service does not allow any client to bind. - * @syscap SystemCapability.Driver.ExternalDevice - * @since 19 - */ - function bindDriverWithDeviceId(deviceId: number, onDisconnect: AsyncCallback): Promise; +/** +* Bind the device based on the device information returned by queryDevices(). +* +* @permission ohos.permission.ACCESS_DDK_DRIVERS +* @param { long } deviceId - Device id on the device list returned by queryDevices(). +* @param { AsyncCallback } onDisconnect - Callback is invoked when device is disconnected after bind +* success. +* @returns { Promise } Indicates the bind result including device ID and remote object. +* @throws { BusinessError } 201 - The permission check failed. +* @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. +* @throws { BusinessError } 26300002 - The driver service does not allow any client to bind. +* @syscap SystemCapability.Driver.ExternalDevice +* @since arkts{ '1.1':'19','1.2':'20'} +* @arkts 1.1&1.2 +*/ + function bindDriverWithDeviceId(deviceId: long, onDisconnect: AsyncCallback): Promise; - /** - * Unbind the device based on the device information returned by queryDevices(). - * - * @permission ohos.permission.ACCESS_DDK_DRIVERS - * @param { number } deviceId - Device id on the device list returned by queryDevices(). - * @returns { Promise } - Indicates the unbind result invoked when unbind is finished. - * @throws { BusinessError } 201 - The permission check failed. - * @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. - * @throws { BusinessError } 26300003 - There is no binding relationship. - * @syscap SystemCapability.Driver.ExternalDevice - * @since 19 - */ - function unbindDriverWithDeviceId(deviceId: number): Promise; +/** +* Unbind the device based on the device information returned by queryDevices(). +* +* @permission ohos.permission.ACCESS_DDK_DRIVERS +* @param { long } deviceId - Device id on the device list returned by queryDevices(). +* @returns { Promise } - Indicates the unbind result invoked when unbind is finished. +* @throws { BusinessError } 201 - The permission check failed. +* @throws { BusinessError } 26300001 - ExternalDeviceManager service exception. +* @throws { BusinessError } 26300003 - There is no binding relationship. +* @syscap SystemCapability.Driver.ExternalDevice +* @since arkts{ '1.1':'19','1.2':'20'} +* @arkts 1.1&1.2 +*/ + function unbindDriverWithDeviceId(deviceId: long): Promise; /** * Enumerates the bus types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum BusType { /** * USB device type * * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ USB = 1, } @@ -241,7 +249,8 @@ declare namespace deviceManager { * * @typedef Device * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Device { /** @@ -249,25 +258,28 @@ declare namespace deviceManager { * * @type { BusType } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ busType: BusType; /** * Device ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: long; /** * Description of the device. * * @type { string } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; } @@ -278,26 +290,29 @@ declare namespace deviceManager { * @typedef USBDevice * @extends Device * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface USBDevice extends Device { /** * Vendor ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - vendorId: number; + vendorId: int; /** * Product ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - productId: number; + productId: int; } /** @@ -305,24 +320,27 @@ declare namespace deviceManager { * * @typedef RemoteDeviceDriver * @syscap SystemCapability.Driver.ExternalDevice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RemoteDeviceDriver { /** * Device ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.Driver.ExternalDevice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: long; /** * Remote driver object. * * @type { rpc.IRemoteObject } * @syscap SystemCapability.Driver.ExternalDevice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ remote: rpc.IRemoteObject; } @@ -333,48 +351,53 @@ declare namespace deviceManager { * @typedef USBInterfaceDesc * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface USBInterfaceDesc { /** * Interface number. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - bInterfaceNumber: number; + bInterfaceNumber: int; /** * Interface class code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - bClass: number; + bClass: int; /** * Interface subclass code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - bSubClass: number; + bSubClass: int; /** * Interface protocol. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - bProtocol: number; + bProtocol: int; } @@ -384,18 +407,20 @@ declare namespace deviceManager { * @typedef DeviceInfo * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceInfo { /** * Device ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: long; /** * Whether the device has a matched driver. @@ -403,7 +428,8 @@ declare namespace deviceManager { * @type { boolean } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isDriverMatched: boolean; @@ -413,7 +439,8 @@ declare namespace deviceManager { * @type { ?string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ driverUid?: string; } @@ -425,28 +452,31 @@ declare namespace deviceManager { * @extends DeviceInfo * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface USBDeviceInfo extends DeviceInfo { /** * Vendor ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - vendorId: number; + vendorId: int; /** * Product ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - productId: number; + productId: int; /** * List of USB interface descriptors. @@ -454,7 +484,8 @@ declare namespace deviceManager { * @type { Array> } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interfaceDescList: Array>; } @@ -465,7 +496,8 @@ declare namespace deviceManager { * @typedef DriverInfo * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DriverInfo { /** @@ -474,7 +506,8 @@ declare namespace deviceManager { * @type { BusType } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ busType: BusType; @@ -484,7 +517,8 @@ declare namespace deviceManager { * @type { string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ driverUid: string; @@ -494,7 +528,8 @@ declare namespace deviceManager { * @type { string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ driverName: string; @@ -504,7 +539,8 @@ declare namespace deviceManager { * @type { string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ driverVersion: string; @@ -514,7 +550,8 @@ declare namespace deviceManager { * @type { string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ driverSize: string; @@ -524,7 +561,8 @@ declare namespace deviceManager { * @type { string } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; } @@ -536,28 +574,31 @@ declare namespace deviceManager { * @extends DriverInfo * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface USBDriverInfo extends DriverInfo { /** * IDs of supported products. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - productIdList: Array; + productIdList: Array; /** * IDs of supported vendors. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Driver.ExternalDevice * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - vendorIdList: Array; + vendorIdList: Array; } } diff --git a/api/@ohos.effectKit.d.ts b/api/@ohos.effectKit.d.ts index 6d5954d3c841b396bdbfc9a4c4cb41fe5bf269df..87143460affd54b694b51ec21a3c80289ef9db99 100644 --- a/api/@ohos.effectKit.d.ts +++ b/api/@ohos.effectKit.d.ts @@ -242,6 +242,18 @@ declare namespace effectKit { * @arkts 1.1&1.2 */ getEffectPixelMap(): Promise; + + /** + * Gets the PixelMap where all filter effects have been added to the image. + * @param { boolean } useCpuRender - Whether to use cpu render. + * @returns { Promise } - returns the PixelMap generated. + * @syscap SystemCapability.Multimedia.Image.Core + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + getEffectPixelMap(useCpuRender : boolean): Promise; } /** diff --git a/api/@ohos.enterprise.accountManager.d.ts b/api/@ohos.enterprise.accountManager.d.ts index 42e6e5e99a90a2bcae58eacc3e476e819168d1ff..5792625b8e256afc75ecdde867fa1d1a0e07d974 100644 --- a/api/@ohos.enterprise.accountManager.d.ts +++ b/api/@ohos.enterprise.accountManager.d.ts @@ -256,6 +256,7 @@ declare namespace accountManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 19 @@ -274,6 +275,7 @@ declare namespace accountManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 19 diff --git a/api/@ohos.enterprise.adminManager.d.ts b/api/@ohos.enterprise.adminManager.d.ts index de7d7d017c4832a97d82272429cd63c9afae4198..9a89a27f420c7053f0dfd3cbeb263444c46ed356 100644 --- a/api/@ohos.enterprise.adminManager.d.ts +++ b/api/@ohos.enterprise.adminManager.d.ts @@ -356,6 +356,23 @@ declare namespace adminManager { * @stagemodelonly * @since 12 */ + /** + * Disables a current administrator ability. + * Only apps with the ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN permission, + * ohos.permission.START_PROVISIONING_MESSAGE or the shell uid can call this method. + * + * @permission ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN or ohos.permission.START_PROVISIONING_MESSAGE + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { number } [userId] - userId indicates the user ID or do not pass user ID. + * @returns { Promise } the promise returned by the disableAdmin. + * @throws { BusinessError } 9200005 - Failed to deactivate the administrator application of the device. + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ function disableAdmin(admin: Want, userId?: number): Promise; /** @@ -768,6 +785,21 @@ declare namespace adminManager { function getDelegatedPolicies(admin: Want, bundleName: string): Array; /** + * Query wether self is a BYOD administrater. + * + * @permission ohos.permission.START_PROVISIONING_MESSAGE + * @param { Want } admin - admin indicates the administrator ability information. + * @returns { boolean } true if byod admin is active, otherwise false. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function isByodAdmin(admin: Want): boolean; + +/** * Administrator gets the delegated applications which access to the policy. * * @permission ohos.permission.ENTERPRISE_MANAGE_DELEGATED_POLICY @@ -832,6 +864,23 @@ declare namespace adminManager { * @since 18 */ function replaceSuperAdmin(oldAdmin: Want, newAdmin: Want, isKeepPolicy: boolean): void; + + /** + * Administrator delegates access to policies to another application. + * + * @permission ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN + * @param { string } bundleName - bundleName indicates the bundle name of the delegated application. + * @param { Array } policies - policies indicates the policies accessible to the delegated application. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200009 - Failed to grant the permission to the application. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @systemapi + * @stagemodelonly + * @since 20 + */ + function setDelegatedPolicies(bundleName: string, accountId: number, policies: Array): void; } export default adminManager; diff --git a/api/@ohos.enterprise.applicationManager.d.ts b/api/@ohos.enterprise.applicationManager.d.ts index 98c216af91ff8d48d225345ef0ae3cc2afd6f3bf..595106577055a044b204f8e50b9fa7932b896f9f 100644 --- a/api/@ohos.enterprise.applicationManager.d.ts +++ b/api/@ohos.enterprise.applicationManager.d.ts @@ -347,6 +347,28 @@ declare namespace applicationManager { */ function addAutoStartApps(admin: Want, autoStartApps: Array): void; + /** + * Adds auto start applications which are not allowed to modify their auto start settings. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } autoStartApps - autoStartApps indicates the information of auto start app ability. + * The bundleName and abilityName of the want cannot be non-exist. + * The size of the array after setting cannot be greater than 10. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @param { boolean } disallowModify - disallowModify specifies whether the applications are + * disallowed to modify their auto start setting. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function addAutoStartApps(admin: Want, autoStartApps: Array, accountId: number, disallowModify: boolean): void; + /** * Removes auto start applications. * This function can be called by a super administrator. @@ -368,6 +390,26 @@ declare namespace applicationManager { */ function removeAutoStartApps(admin: Want, autoStartApps: Array): void; + /** + * Removes auto start applications. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } autoStartApps - autoStartApps indicates the information of auto start app ability. + * The bundleName and abilityName of the want cannot be non-exist. + * The size of the array after setting cannot be greater 10. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function removeAutoStartApps(admin: Want, autoStartApps: Array, accountId: number): void; + /** * Gets information of auto start applications. * This function can be called by a super administrator. @@ -387,6 +429,44 @@ declare namespace applicationManager { */ function getAutoStartApps(admin: Want): Array; + /** + * Gets information of auto start applications. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @returns { Array } the information of auto start applications. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getAutoStartApps(admin: Want, accountId: number): Array; + + /** + * Checks whether the specified application is allowed to modify its auto start setting. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_APPLICATION + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Want } autoStartApp - autoStartApp indicates the information of auto start app ability to be checked. + * The bundleName and abilityName of the want cannot be non-exist. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @returns { boolean } true indicates the application is not allowed to modify its auto start setting. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function isModifyAutoStartAppsDisallowed(admin: Want, autoStartApp: Want, accountId: number): boolean; + /** * Adds the keep alive applications. * This function can be called by a super administrator. @@ -405,6 +485,7 @@ declare namespace applicationManager { * required to call the API * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types;3.Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 14 @@ -429,6 +510,7 @@ declare namespace applicationManager { * @throws { BusinessError } 9201005 - Add keep alive applications failed. * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission * required to call the API + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -523,17 +605,17 @@ declare namespace applicationManager { * * @permission ohos.permission.ENTERPRISE_SET_KIOSK * @param { Want } admin - admin indicates the enterprise admin extension ability information. - * The admin must have the corresponding permission. - * @param { Array } bundleNames - bundleNames indicates the bundle names of applications. + * The admin must have the corresponding permission. + * @param { Array } appIdentifiers - appIdentifiers indicates the appIdentifiers of applications. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission - * required to call the API. + * required to call the API. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 */ - function setAllowedKioskApps(admin: Want, bundleNames: Array): void; + function setAllowedKioskApps(admin: Want, appIdentifiers: Array): void; /** * Get applications allowed running in kiosk mode. @@ -541,12 +623,12 @@ declare namespace applicationManager { * * @permission ohos.permission.ENTERPRISE_SET_KIOSK * @param { Want } admin - admin indicates the enterprise admin extension ability information. - * The admin must have the corresponding permission. - * @returns { Array } the bundle names of allowed running in kiosk mode. + * The admin must have the corresponding permission. + * @returns { Array } the appIdentifiers of applications that allowed running in kiosk mode. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission - * required to call the API + * required to call the API * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -556,13 +638,13 @@ declare namespace applicationManager { /** * Check target application allowed running in kiosk mode. * - * @param { string } bundleName - bundleName indicates the bundle names of application. - * @returns { boolean } true means the bundle name allowed running in kiosk mode, otherwise false. + * @param { string } appIdentifier - appIdentifier indicates the appIdentifier of application. + * @returns { boolean } true means the application allowed running in kiosk mode, otherwise false. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 */ - function isAppKioskAllowed(bundleName: string): boolean; + function isAppKioskAllowed(appIdentifier: string): boolean; /** * Sets kiosk feature in kiosk mode. @@ -574,6 +656,7 @@ declare namespace applicationManager { * @param { Array } features - kiosk feature to allow custom ui. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission * required to call the API. * @syscap SystemCapability.Customization.EnterpriseDeviceManager diff --git a/api/@ohos.enterprise.bluetoothManager.d.ts b/api/@ohos.enterprise.bluetoothManager.d.ts index a070d05169acceaab6ae10895c1414490c2a3436..0effe1fdf4be39139b6aae067755112ee97b0bcd 100644 --- a/api/@ohos.enterprise.bluetoothManager.d.ts +++ b/api/@ohos.enterprise.bluetoothManager.d.ts @@ -97,6 +97,15 @@ declare namespace bluetoothManager { * @since 20 */ SPP = 1, + + /** + * Opp protocol. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + OPP = 2, } /** diff --git a/api/@ohos.enterprise.bundleManager.d.ts b/api/@ohos.enterprise.bundleManager.d.ts index 1b0989e09e1f2871be1f2648ec63bc63949ddad8..1c12e481a45aecb07b1809a1d21d8a52d9107dda 100644 --- a/api/@ohos.enterprise.bundleManager.d.ts +++ b/api/@ohos.enterprise.bundleManager.d.ts @@ -1605,6 +1605,7 @@ declare namespace bundleManager { * @param { Array } appDistributionTypes - appdistribution types id. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly @@ -1621,6 +1622,7 @@ declare namespace bundleManager { * @param { Array } appDistributionTypes - appdistribution types id. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly @@ -1649,6 +1651,7 @@ declare namespace bundleManager { * * @enum { number } * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly * @since 20 */ enum AppDistributionType { diff --git a/api/@ohos.enterprise.deviceSettings.d.ts b/api/@ohos.enterprise.deviceSettings.d.ts index 513c1e4c681b773bd065479d9419e8616095d5ac..f9dfc123de3e72ddedab1a73c4e197ae6674ff2b 100644 --- a/api/@ohos.enterprise.deviceSettings.d.ts +++ b/api/@ohos.enterprise.deviceSettings.d.ts @@ -420,6 +420,44 @@ declare namespace deviceSettings { * @since 12 */ function getValue(admin: Want, item: string): string; + + /** + * Sets home wallpaper. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_SET_WALLPAPER + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { number } fd - the descriptor of home wallpaper file. + * @returns { Promise } the promise returned by the setHomeWallpaper. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function setHomeWallpaper(admin: Want, fd: number): Promise; + + /** + * Sets unlock wallpaper. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_SET_WALLPAPER + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { number } fd - the descriptor of unlock wallpaper file. + * @returns { Promise } the promise returned by the setUnlockWallpaper. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed.The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function setUnlockWallpaper(admin: Want, fd: number): Promise; } export default deviceSettings; diff --git a/api/@ohos.enterprise.networkManager.d.ts b/api/@ohos.enterprise.networkManager.d.ts index 880a8085dbd85967b924c05b11e4b1f73ca7f074..3f901c384c7279a843d60e67c389c3a8d15ff77e 100644 --- a/api/@ohos.enterprise.networkManager.d.ts +++ b/api/@ohos.enterprise.networkManager.d.ts @@ -938,6 +938,7 @@ declare namespace networkManager { * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 15 @@ -1023,7 +1024,24 @@ declare namespace networkManager { * @stagemodelonly * @since 15 */ - function getGlobalProxyForAccount(admin: Want, accountId: number): connection.HttpProxy; + /** + * Obtains the network independent global {@link connection.HttpProxy} proxy for a system account. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_NETWORK + * @param { Want | null } admin - admin indicates the administrator ability information.If the admin is not empty, it must + * have the corresponding permission. + * @param { number } accountId - accountId indicates the account ID. + * @returns { connection.HttpProxy } the network global proxy configuration information. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getGlobalProxyForAccount(admin: Want | null, accountId: number): connection.HttpProxy; /** * Add iptables filter rule by {@link AddFilterRule}. diff --git a/api/@ohos.enterprise.restrictions.d.ts b/api/@ohos.enterprise.restrictions.d.ts index e14f48436ae75f50d5e8fcee79343026be18734d..ce4145b01dc3f96e4610eda281c0097aba221e8d 100644 --- a/api/@ohos.enterprise.restrictions.d.ts +++ b/api/@ohos.enterprise.restrictions.d.ts @@ -336,6 +336,25 @@ declare namespace restrictions { * @stagemodelonly * @since 20 */ + /** + * Disallows the specific feature of the device. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS or ohos.permission.PERSONAL_MANAGE_RESTRICTIONS + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { string } feature - feature indicates the specific feature to be disallowed or allowed, + * the supported device features are as follows: + * modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb, wifi, tethering, inactiveUserFreeze, camera, + * mtpClient, mtpServer, globalDrag, externalSdCard, backupAndRestore, notification, mms, sms, remoteDiagnosis, remoteDesk, + * nfc, privateSpace, vpn, airplaneMode, mobileData, maintenanceMode, sambaClient, sambaServer, appClone. + * @param { boolean } disallow - true if disallow the specific feature of device, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 21 + */ function setDisallowedPolicy(admin: Want, feature: string, disallow: boolean): void; /** @@ -378,7 +397,7 @@ declare namespace restrictions { * Queries whether the specific feature of the device is disallowed. * * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS or ohos.permission.PERSONAL_MANAGE_RESTRICTIONS - * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * @param { Want | null } admin - admin indicates the enterprise admin extension ability information. * If the admin is not empty, it must have the corresponding permission. * @param { string } feature - feature indicates the specific feature to be queried, * the supported device features are as follows: @@ -393,7 +412,26 @@ declare namespace restrictions { * @stagemodelonly * @since 20 */ - function getDisallowedPolicy(admin: Want, feature: string): boolean; + /** + * Queries whether the specific feature of the device is disallowed. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS or ohos.permission.PERSONAL_MANAGE_RESTRICTIONS + * @param { Want | null } admin - admin indicates the enterprise admin extension ability information. + * If the admin is not empty, it must have the corresponding permission. + * @param { string } feature - feature indicates the specific feature to be queried, + * the supported device features are as follows: + * modifyDateTime, bluetooth, printer, hdc, microphone, fingerprint, usb, wifi, tethering, inactiveUserFreeze, camera, + * mtpClient, mtpServer, globalDrag, externalSdCard, backupAndRestore, notification, mms, sms, remoteDiagnosis, remoteDesk, + * nfc, privateSpace, vpn, airplaneMode, mobileData, maintenanceMode, sambaClient, sambaServer, appClone. + * @returns { boolean } true if the specific feature of device is disallowed, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 21 + */ + function getDisallowedPolicy(admin: Want | null, feature: string): boolean; /** * Disallows the specific feature of the device for the specified account. @@ -413,6 +451,24 @@ declare namespace restrictions { * @stagemodelonly * @since 14 */ + /** + * Disallows the specific feature of the device for the specified account. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * @param { string } feature - feature indicates the specific feature to be disallowed or allowed, + * the supported device features are as follows: + * fingerprint, print, mtpClient, usbStorageDeviceWrite, diskRecoveryKey, sudo, distributedTransmissionOutgoing. + * @param { boolean } disallow - true if disallow the specific feature of device, otherwise false. + * @param { number } accountId - accountId indicates the account ID to be queried. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ function setDisallowedPolicyForAccount(admin: Want, feature: string, disallow: boolean, accountId: number): void; /** @@ -432,7 +488,24 @@ declare namespace restrictions { * @stagemodelonly * @since 14 */ - function getDisallowedPolicyForAccount(admin: Want, feature: string, accountId: number): boolean; + /** + * Queries whether the specific feature of the device is disallowed for the specified account. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_RESTRICTIONS + * @param { Want | null } admin - admin indicates the enterprise admin extension ability information. + * @param { string } feature - feature indicates the specific feature to be queried. + * the supported device features are as follows: + * fingerprint, print, mtpClient, usbStorageDeviceWrite, diskRecoveryKey, sudo, distributedTransmissionOutgoing. + * @param { number } accountId - accountId indicates the account ID to be queried. + * @returns { boolean } true if the specific feature of device is disallowed, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - the administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getDisallowedPolicyForAccount(admin: Want | null, feature: string, accountId: number): boolean; /** * Adds applications or bundles or other contents to the list to restrict them from using a specific feature. diff --git a/api/@ohos.enterprise.securityManager.d.ts b/api/@ohos.enterprise.securityManager.d.ts index a82ec35a5e28b6c2c5cd6c9666e83a69dd4c7c03..4d79891695082040f5deccad6a4e9eb6c93c8c19 100644 --- a/api/@ohos.enterprise.securityManager.d.ts +++ b/api/@ohos.enterprise.securityManager.d.ts @@ -82,6 +82,48 @@ declare namespace securityManager { alias: string; } + /** + * Application instance data. + * + * @typedef ApplicationInstance + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + export interface ApplicationInstance { + /** + * Globally unique identifier of an application, which is allocated by the cloud. + * AppIdentifier does not change along the application lifecycle, including version updates, certificate changes, + * public and private key changes, and application transfer. + * + * @type { string } + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + appIdentifier: string; + + /** + * Indicates the OS account identifier. + * + * @type { number } + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + accountId: number; + + /** + * Indicates the index of clone app. + * + * @type { number } + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + appIndex: number; + } + /** * Gets device security patch tag. * This function can be called by a super administrator. @@ -343,6 +385,43 @@ declare namespace securityManager { */ function getAppClipboardPolicy(admin: Want, bundleName: string, accountId: number): string; + /** + * Sets the application's permission managed state of the device. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_USER_GRANT_PERMISSION + * @param { Want } admin - admin indicates the administrator ability information. + * @param { ApplicationInstance } applicationInstance - Application instance data. + * @param { Array } permissions - permissions indicates the list of permission names that need to manage. + * @param { PermissionManagedState } managedState - the managed state of application permission. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function setPermissionManagedState(admin: Want, applicationInstance: ApplicationInstance, permissions: Array, managedState: PermissionManagedState): void; + + /** + * Gets the permission managed state of an application instance. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_USER_GRANT_PERMISSION + * @param { Want } admin - admin indicates the administrator ability information. + * @param { ApplicationInstance } applicationInstance - applicationInstance indicates an application instance. + * @param { string } permission - permission indicates the permission name which need to get state. + * @returns { PermissionManagedState } the managed state of application permission. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getPermissionManagedState(admin: Want, applicationInstance: ApplicationInstance, permission: string): PermissionManagedState; + /** * Sets the watermark image displayed during the application running. * @@ -465,6 +544,44 @@ declare namespace securityManager { */ CROSS_DEVICE = 3, } + + /** + * Managed State. + * + * @enum { number } PermissionManagedState + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + export enum PermissionManagedState { + /** + * PermissionManagedState default + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + DEFAULT = 1, + + /** + * PermissionManagedState granted, Users do not need to authorize a second time. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + GRANTED = 0, + + /** + * PermissionManagedState DENIED, Users need to authorize a second time. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + DENIED = -1 + } + } export default securityManager; \ No newline at end of file diff --git a/api/@ohos.enterprise.systemManager.d.ts b/api/@ohos.enterprise.systemManager.d.ts index 5e14e768b1b2d2c1011109ea11edd463f29d0dd9..3e4f973c22084df875fddf8c8026c7c78cf15946 100644 --- a/api/@ohos.enterprise.systemManager.d.ts +++ b/api/@ohos.enterprise.systemManager.d.ts @@ -629,6 +629,7 @@ declare namespace systemManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -645,11 +646,135 @@ declare namespace systemManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 */ function getAutoUnlockAfterReboot(admin: Want): boolean; + + /** + * Sets install localEnterpriseApp enable. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { boolean } isEnable - true indicates whether can install localEnterpriseApp, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function setInstallLocalEnterpriseAppEnabled(admin: Want, isEnable: boolean): void; + + /** + * Gets install localEnterpriseApp enable. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @returns { boolean } true indicates whether can install localEnterpriseApp, otherwise false. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getInstallLocalEnterpriseAppEnabled(admin: Want): boolean; + + /** + * Near link protocol + * + * @enum { number } + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + enum NearLinkProtocol { + /** + * SSAP protocol. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + SSAP = 0, + + /** + * DATATRANSFER protocol. + * + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + DATA_TRANSFER = 1 + } + + /** + * Adds protocols to the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } protocols - protocol of the near link to be added to the list. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function addDisallowedNearLinkProtocols(admin: Want, protocols: Array, accountId: number): void; + + /** + * Removes protocol from the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * The admin must have the corresponding permission. + * @param { Array } protocols - protocol of the near link to be removed to the list. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function removeDisallowedNearLinkProtocols(admin: Want, protocols: Array, accountId: number): void; + + /** + * Gets protocols from the list of near link server that are disallowed to use. + * This function can be called by a super administrator. + * + * @permission ohos.permission.ENTERPRISE_MANAGE_SYSTEM + * @param { Want } admin - admin indicates the enterprise admin extension ability information. + * If the admin is not empty, it must have the corresponding permission. + * @param { number } accountId - accountId indicates the local ID of the OS account. + * @returns { Array } protocol of the near link list. + * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. + * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @stagemodelonly + * @since 20 + */ + function getDisallowedNearLinkProtocols(admin: Want, accountId: number): Array; } export default systemManager; \ No newline at end of file diff --git a/api/@ohos.enterprise.telephonyManager.d.ts b/api/@ohos.enterprise.telephonyManager.d.ts index bacb6844d4f7adc1a6d15b7dd5dadc635dfc2a86..e00d013f99dc93867d8846e0e51e2b02e1d1cbb5 100644 --- a/api/@ohos.enterprise.telephonyManager.d.ts +++ b/api/@ohos.enterprise.telephonyManager.d.ts @@ -96,7 +96,11 @@ declare namespace telephonyManager { * @param { Array } numbers - phone numbers will add to the trust/block list. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 203 - This function is prohibited by enterprise management policies. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -114,7 +118,10 @@ declare namespace telephonyManager { * @param { Array } numbers - phone numbers will remove from the trust/block list. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 203 - This function is prohibited by enterprise management policies. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -133,6 +140,7 @@ declare namespace telephonyManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -150,7 +158,11 @@ declare namespace telephonyManager { * @param { Array } numbers - phone numbers will add to the trust/block list. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200010 - A conflict policy has been configured. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 203 - This function is prohibited by enterprise management policies. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -168,7 +180,10 @@ declare namespace telephonyManager { * @param { Array } numbers - phone numbers will remove from the trust/block list. * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. + * @throws { BusinessError } 9200012 - Parameter verification failed. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 203 - This function is prohibited by enterprise management policies. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 @@ -187,6 +202,7 @@ declare namespace telephonyManager { * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly * @since 20 diff --git a/api/@ohos.events.emitter.d.ts b/api/@ohos.events.emitter.d.ts index 95023e612cd99fc481ca7803171cc4bc9c1cccbb..b67693c8d0fc7d94f259a69507d5c9fc4bc8e8a5 100644 --- a/api/@ohos.events.emitter.d.ts +++ b/api/@ohos.events.emitter.d.ts @@ -93,7 +93,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(eventId: string, callback: Callback): void; @@ -105,7 +106,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(eventId: string, callback: Callback>): void; @@ -147,7 +149,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function once(event: InnerEvent, callback: Callback): void; @@ -168,7 +171,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function once(eventId: string, callback: Callback): void; @@ -180,7 +184,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function once(eventId: string, callback: Callback>): void; @@ -226,12 +231,15 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(eventId: string): void; /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { number } eventId - Event ID. * @param { Callback } callback - Callback to unregister. @@ -240,6 +248,8 @@ declare namespace emitter { */ /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { number } eventId - Event ID. * @param { Callback } callback - Callback to unregister. @@ -249,6 +259,8 @@ declare namespace emitter { */ /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { number } eventId - Event ID. * @param { Callback } callback - Callback to unregister. @@ -262,6 +274,8 @@ declare namespace emitter { /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { string } eventId - Event ID. The value cannot be an empty string and exceed 10240 bytes. * @param { Callback } callback - Callback to unregister. @@ -271,25 +285,31 @@ declare namespace emitter { */ /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { string } eventId - Event ID. The value cannot be an empty string and exceed 10240 bytes. * @param { Callback } callback - Callback to unregister. * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(eventId: string, callback: Callback): void; /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * This API takes effect only when Callback has been registered through the on or once API. + * Otherwise, no processing is performed. * * @param { string } eventId - Event ID. The value cannot be an empty string and exceed 10240 bytes. * @param { Callback> } callback - Callback to unregister. * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(eventId: string, callback: Callback>): void; @@ -353,7 +373,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function emit(eventId: string, data?: EventData): void; @@ -365,7 +386,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function emit(eventId: string, data?: GenericEventData): void; @@ -401,7 +423,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function emit(eventId: string, options: Options, data?: EventData): void; @@ -414,7 +437,8 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function emit(eventId: string, options: Options, data?: GenericEventData): void; @@ -731,7 +755,6 @@ declare namespace emitter { * * @type { ?EventPriority } * @syscap SystemCapability.Notification.Emitter - * @atomicservice * @since 11 */ /** diff --git a/api/@ohos.file.AlbumPickerComponent.d.ets b/api/@ohos.file.AlbumPickerComponent.d.ets index 1b62ae6421790d9557cb8a1bed83d2a427d3943a..a512bafea218ae14c707a802014374b5f4822727 100644 --- a/api/@ohos.file.AlbumPickerComponent.d.ets +++ b/api/@ohos.file.AlbumPickerComponent.d.ets @@ -59,6 +59,16 @@ export declare struct AlbumPickerComponent { * @since 13 */ onEmptyAreaClick?: EmptyAreaClickCallback; + + /** + * AlbumPickerController + * + * @type { ?AlbumPickerController } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + albumPickerController?: AlbumPickerController; } /** @@ -98,6 +108,16 @@ export declare class AlbumPickerOptions { * @since 13 */ filterType?: photoAccessHelper.PhotoViewMIMETypes; + + /** + * The size of the font displayed in the album. When `fontSize` is a number type, must use 'fp' unit + * + * @type { ?(number | string) } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + fontSize?: number | string; } @@ -128,4 +148,25 @@ export declare class AlbumInfo { * @since 12 */ albumName?: string; -} \ No newline at end of file +} + + +/** + * The class for AlbumPickerController + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ +@Observed +export declare class AlbumPickerController { + /** + * Set font size to album picker component + * + * @param { number | string } fontSize - font size of album picker component + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + setFontSize(fontSize: number | string): void; +} diff --git a/api/@ohos.file.PhotoPickerComponent.d.ets b/api/@ohos.file.PhotoPickerComponent.d.ets index 9550ff0b3b3955216d991047639ca9a6de63b792..52885ab0e0a6ceaf1110393a097b0ce687f9727d 100644 --- a/api/@ohos.file.PhotoPickerComponent.d.ets +++ b/api/@ohos.file.PhotoPickerComponent.d.ets @@ -351,6 +351,26 @@ export declare class PickerOptions extends photoAccessHelper.BaseSelectOptions { */ photoBrowserMargin?: Margin; + /** + * Support to set offset between first grid item and the top of the grid + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + gridStartOffset?: number; + + /** + * Support to set offset between last grid item and the bottom of the grid + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + gridEndOffset?: number; + /** * Support repeat select * diff --git a/api/@ohos.file.RecentPhotoComponent.d.ets b/api/@ohos.file.RecentPhotoComponent.d.ets index 32a27a1dac62c6876ad02517809dcf0ada5f8a42..9094ee5e020c8c77bc09cede5ff1791a6eefc76b 100644 --- a/api/@ohos.file.RecentPhotoComponent.d.ets +++ b/api/@ohos.file.RecentPhotoComponent.d.ets @@ -150,7 +150,6 @@ export declare class RecentPhotoOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ isAutoRefreshSupported?: boolean; @@ -161,7 +160,6 @@ export declare class RecentPhotoOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ colorMode?: PickerColorMode; } diff --git a/api/@ohos.file.backup.d.ts b/api/@ohos.file.backup.d.ts index 723db6e50adf6b59397f842c5ae4b8f938dbe6a8..4310765c872cf78e6e4bd37d333a46abbc4f8910 100644 --- a/api/@ohos.file.backup.d.ts +++ b/api/@ohos.file.backup.d.ts @@ -677,6 +677,21 @@ declare namespace backup { * @since 20 */ cleanBundleTempDir(bundleName: string): Promise; + + /** + * Provides an interface for the tool to get compatibility info. + * @permission ohos.permission.BACKUP + * @param { string } bundleName - Set the bundleName of the application that need to get compatibilityInfo. + * @param { string } extInfo - Indicates the extension information of application. + * @returns { Promise } Return compatibility info. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 20 + */ + getCompatibilityInfo(bundleName: string, extInfo: string): Promise; } /** @@ -901,6 +916,21 @@ declare namespace backup { * @since 20 */ cleanBundleTempDir(bundleName: string): Promise; + + /** + * Provides an interface for the tool to get compatibility info. + * @permission ohos.permission.BACKUP + * @param { string } bundleName - Set the bundleName of the application that need to get compatibilityInfo. + * @param { string } extInfo - Indicates the extension information of application. + * @returns { Promise } Return compatibility info. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 20 + */ + getCompatibilityInfo(bundleName: string, extInfo: string): Promise; } /** @@ -1059,6 +1089,21 @@ declare namespace backup { * @since 20 */ cleanBundleTempDir(bundleName: string): Promise; + + /** + * Provides an interface for the tool to get compatibility info. + * @permission ohos.permission.BACKUP + * @param { string } bundleName - Set the bundleName of the application that need to get compatibilityInfo. + * @param { string } extInfo - Indicates the extension information of application. + * @returns { Promise } Return compatibility info. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, + * application which is not a system application uses system API. + * @syscap SystemCapability.FileManagement.StorageService.Backup + * @systemapi + * @since 20 + */ + getCompatibilityInfo(bundleName: string, extInfo: string): Promise; } } export default backup; diff --git a/api/@ohos.file.cloudSync.d.ts b/api/@ohos.file.cloudSync.d.ts index 0c838954cb4fe33ed6ece67d3fef8b813e1b4d22..d5934b84dbee945cbe0ac97eb0f0d36aa2f4812a 100644 --- a/api/@ohos.file.cloudSync.d.ts +++ b/api/@ohos.file.cloudSync.d.ts @@ -161,6 +161,14 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ DEVICE_TEMPERATURE_TOO_HIGH = 7, + /** + * Synchronization aborted due to remote server is abnormal. + * + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + REMOTE_SERVER_ABNORMAL = 8, } @@ -485,6 +493,158 @@ declare namespace cloudSync { error: DownloadErrorType; } + /** + * Describes the download file type. + * @enum { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + enum DownloadFileType { + /** + * Content file type. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + CONTENT = 0, + /** + * Thumbnail file type. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + THUMBNAIL = 1, + /** + * LCD file type. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + LCD = 2 + } + + /** + * FailedFileInfo struct. + * @interface FailedFileInfo + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + interface FailedFileInfo { + /** + * The uri of the file that failes to be downloaded. + * @type { string } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + uri: string; + /** + * Error code of the file that failes to be downloaded. + * @type { DownloadErrorType } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + error: DownloadErrorType; + } + + /** + * MultiDownloadProgress object. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + class MultiDownloadProgress { + /** + * The current download state. + * @type { State } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + state: State; + /** + * The download ID of the batch files. + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + taskId: number; + /** + * The number of files that downloaded successfully + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + successfulCount: number; + /** + * The number of files that fail to be downloaded. + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + failedCount: number; + /** + * Total number of the batch files. + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + totalCount: number; + /** + * Total size of downloaded files. + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + downloadedSize: number; + /** + * Total size of the batch files. + * @type { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + totalSize: number; + /** + * The error type of download. + * @type { DownloadErrorType } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + errType: DownloadErrorType; + /** + * Get the list of files that fail to be downloaded. + * @returns { Array } - Return list of files that fail to be downloaded. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + getFailedFiles(): Array; + /** + * Get the list of files that are successfully downloaded. + * @returns { Array } - Return list of files that are successfully downloaded. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + getSuccessfulFiles(): Array; + } + /** * Download object. * @@ -783,6 +943,21 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ on(event: 'progress', callback: Callback): void; + /** + * Subscribes to a batch of cloud file cache download progress change event. This method uses a callback to get download progress changes. + * + * @param { 'batchDownload' } event - event type. + * @param { Callback } callback - callback function with a `MultiDownloadProgress` argument. + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + on(event: 'batchDownload', callback: Callback): void; /** * Unsubscribes from cloud file cache download progress event. * @@ -796,7 +971,21 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ off(event: 'progress', callback?: Callback): void; - + /** + * Unsubscribes from cloud file cache download progress event. + * + * @param { 'batchDownload' } event - event type. + * @param { Callback } [callback] - callback function with a `MultiDownloadProgress` argument. + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + off(event: 'batchDownload', callback?: Callback): void; /** * Start the cloud file cache download task. * @@ -829,6 +1018,25 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ start(uri: string, callback: AsyncCallback): void; + /** + * Batch start the cloud file cache download task. + * + * @param { Array } uris - The list of uri of file. + * @param { DownloadFileType } [fileType] - download file type. + * @returns { Promise } - Return the downloadId in Promise mode. + * @throws { BusinessError } 13600001 - IPC error. Possible causes: + *
1.IPC failed or timed out. 2.Failed to load the service. + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 22400004 - Exceed the maximum limit. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + startBatch(uris: Array, fileType?: DownloadFileType): Promise; /** * Stop the cloud file cache download task. * @@ -873,6 +1081,24 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ stop(uri: string, callback: AsyncCallback): void; + /** + * Batch stop the cloud file caches download task. + * + * @param { number } downloadId - The download ID of a batch of file cache. + * @param { boolean } [needClean] - whether to delete the file that already downloaded. + * @returns { Promise } - Return Promise. + * @throws { BusinessError } 13600001 - IPC error. Possible causes: + *
1.IPC failed or timed out. 2.Failed to load the service. + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + * @arkts 1.1&1.2 + */ + stopBatch(downloadId: number, needClean?: boolean): Promise; /** * Clean the local file cache. * @@ -891,8 +1117,71 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ cleanCache(uri: string): void; + /** + * Clean local content of the file that has been synced to the Cloud + * + * @param { string } uri - uri of file. + * @throws { BusinessError } 13600001 - IPC error. Possible causes: + *
1.IPC failed or timed out. 2.Failed to load the service. + * @throws { BusinessError } 13900002 - No such file or directory. + * @throws { BusinessError } 13900010 - Try again. + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 14000002 - Invalid URI. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + cleanFileCache(uri: string): void; } + /** + * Describes the external sync state of file. + * @enum { number } + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + enum FileState { + /** + * Indicates the initial state after a file is downloaded from the cloud to the local host. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + INITIAL_AFTER_DOWNLOAD = 0, + /** + * Indicates that the file is uploading now. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + UPLOADING = 1, + /** + * Indicates that the file sync task stopped. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + STOPPED = 2, + /** + * Indicates that the file is waiting for upload. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + TO_BE_UPLOADED = 3, + /** + * Indicates that the file has been already uploaded successfully. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + UPLOAD_SUCCESS = 4, + /** + * Indicates that the file upload failure + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + UPLOAD_FAILURE = 5 + } /** * Describes the sync state of file. * @@ -987,6 +1276,28 @@ declare namespace cloudSync { * @arkts 1.1&1.2 */ function getFileSyncState(uri: Array): Promise>; + /** + * Get the sync state of the specified file. + * + * @param { string } uri - uri of file. + * @returns { FileState } - return the sync state of the specified file. + * @throws { BusinessError } 13600001 - IPC error. Possible causes: + *
1.IPC failed or timed out. 2.Failed to load the service. + * @throws { BusinessError } 13900002 - No such file or directory. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: + *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 14000002 - Invalid URI. + * @throws { BusinessError } 22400005 - Inner error. Possible causes: + *
1.Failed to access the database or execute the SQL statement. + *
2.System error, such as a null pointer, insufficient memory or a JS engine exception. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @since 20 + */ + function getCoreFileSyncState(uri: string): FileState; /** * Get the sync state of file. * @@ -1427,7 +1738,7 @@ declare namespace cloudSync { * @throws { BusinessError } 13900002 - No such file or directory. * @throws { BusinessError } 13900010 - Try again. * @throws { BusinessError } 13900012 - Permission denied by the file system. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 14000002 - Invalid URI. * @throws { BusinessError } 22400002 - Network unavailable. @@ -1451,7 +1762,7 @@ declare namespace cloudSync { * @throws { BusinessError } 13900002 - No such file or directory. * @throws { BusinessError } 13900010 - Try again. * @throws { BusinessError } 13900012 - Permission denied by the file system. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 14000002 - Invalid URI. * @throws { BusinessError } 22400002 - Network unavailable. @@ -1476,7 +1787,7 @@ declare namespace cloudSync { * @throws { BusinessError } 13900008 - Bad file descriptor. * @throws { BusinessError } 13900010 - Try again. * @throws { BusinessError } 13900012 - Permission denied by the file system. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 14000002 - Invalid URI. Possible causes: 1.originalUri invalid; 2.versionUri invalid. * @throws { BusinessError } 22400005 - Inner error. Possible causes: @@ -1498,7 +1809,7 @@ declare namespace cloudSync { * @throws { BusinessError } 13900002 - No such file or directory. * @throws { BusinessError } 13900010 - Try again. * @throws { BusinessError } 13900012 - Permission denied by the file system. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 14000002 - Invalid URI. * @throws { BusinessError } 22400005 - Inner error. Possible causes: @@ -1519,7 +1830,7 @@ declare namespace cloudSync { * @throws { BusinessError } 13900002 - No such file or directory. * @throws { BusinessError } 13900010 - Try again. * @throws { BusinessError } 13900012 - Permission denied by the file system. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 14000002 - Invalid URI. * @throws { BusinessError } 22400005 - Inner error. Possible causes: diff --git a/api/@ohos.file.cloudSyncManager.d.ts b/api/@ohos.file.cloudSyncManager.d.ts index 4b911cc2828f1c3f55e600639f0fe07579c28a0c..99d2bc1250459fdd128c6b96ca8db9339603b884 100644 --- a/api/@ohos.file.cloudSyncManager.d.ts +++ b/api/@ohos.file.cloudSyncManager.d.ts @@ -564,7 +564,7 @@ declare namespace cloudSyncManager { * @param { string } bundleName - Name of the bundle that need to synchronize and subscribe the sync progress event. * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 22400005 - Inner error. Possible causes: *
1.Failed to access the database or execute the SQL statement. @@ -607,7 +607,7 @@ declare namespace cloudSyncManager { * @throws { BusinessError } 13600001 - IPC error. Possible causes: *
1.IPC failed or timed out. 2.Failed to load the service. * @throws { BusinessError } 13900010 - Try again. - * @throws { BusinessError } 13900020 - Parameter error. Possible causes: + * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: *
1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 22400005 - Inner error. Possible causes: *
1.Failed to access the database or execute the SQL statement. diff --git a/api/@ohos.file.environment.d.ts b/api/@ohos.file.environment.d.ts index 5d89e2c967fc799815049604852d2b59344036a2..b5a2d167db20f5b4310f0453658836ca052168f7 100644 --- a/api/@ohos.file.environment.d.ts +++ b/api/@ohos.file.environment.d.ts @@ -25,7 +25,8 @@ import type { AsyncCallback } from './@ohos.base'; * * @namespace Environment * @syscap SystemCapability.FileManagement.File.Environment - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace Environment { /** @@ -37,7 +38,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.Environment * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getStorageDataDir(): Promise; @@ -50,7 +52,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.Environment * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getStorageDataDir(callback: AsyncCallback): void; @@ -63,7 +66,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.Environment * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserDataDir(): Promise; @@ -76,7 +80,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.Environment * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserDataDir(callback: AsyncCallback): void; @@ -98,7 +103,8 @@ declare namespace Environment { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.File.Environment.FolderObtain - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserDownloadDir(): string; @@ -120,7 +126,8 @@ declare namespace Environment { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.File.Environment.FolderObtain - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserDesktopDir(): string; @@ -142,7 +149,8 @@ declare namespace Environment { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.File.Environment.FolderObtain - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserDocumentDir(): string; @@ -157,7 +165,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.File.Environment.FolderObtain * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getExternalStorageDir(): string; @@ -172,7 +181,8 @@ declare namespace Environment { * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.File.Environment.FolderObtain * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserHomeDir(): string; } diff --git a/api/@ohos.file.fs.d.ets b/api/@ohos.file.fs.d.ets index 13361e559a198e85850a36bb695e73e9823a5b33..d74889cbfb572c90536e8705afe3cc85b1376fc9 100644 --- a/api/@ohos.file.fs.d.ets +++ b/api/@ohos.file.fs.d.ets @@ -26,8 +26,6 @@ import { AsyncCallback } from './@ohos.base'; * * @namespace fileIo * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ declare namespace fileIo { @@ -37,8 +35,6 @@ declare namespace fileIo { * * @namespace OpenMode * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ namespace OpenMode { @@ -47,8 +43,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const READ_ONLY = 0o0; @@ -57,8 +51,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const WRITE_ONLY = 0o1; @@ -67,8 +59,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const READ_WRITE = 0o2; @@ -77,8 +67,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const CREATE = 0o100; @@ -87,8 +75,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const TRUNC = 0o1000; @@ -97,8 +83,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const APPEND = 0o2000; @@ -107,7 +91,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const NONBLOCK = 0o4000; @@ -116,7 +99,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const DIR = 0o200000; @@ -125,7 +107,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const NOFOLLOW = 0o400000; @@ -134,7 +115,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const SYNC = 0o4010000; @@ -159,8 +139,6 @@ declare namespace fileIo { * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function access(path: string, mode?: AccessModeType): Promise; @@ -183,8 +161,6 @@ function access(path: string, mode?: AccessModeType): Promise; * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function access(path: string, callback: AsyncCallback): void; @@ -232,8 +208,6 @@ function access(path: string, mode: AccessModeType, flag: AccessFlagType): Promi * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function accessSync(path: string, mode?: AccessModeType): boolean; @@ -273,8 +247,6 @@ function accessSync(path: string, mode: AccessModeType, flag: AccessFlagType): b * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function close(file: number | File): Promise; @@ -291,8 +263,6 @@ function close(file: number | File): Promise; * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function close(file: number | File, callback: AsyncCallback): void; @@ -308,116 +278,131 @@ function close(file: number | File, callback: AsyncCallback): void; * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ function closeSync(file: number | File): void; /** - * Copy file. + * Copy file or directory. * - * @param { string | number } src - src. - * @param { string | number } dest - dest. - * @param { number } [mode = 0] - mode. + * @param { string } srcUri - src uri. + * @param { string } destUri - dest uri. + * @param { CopyOptions } [options] - options. * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory - * @throws { BusinessError } 13900012 - Permission denied - * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900031 - Function not implemented - * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function copyFile(src: string | number, dest: string | number, mode?: number): Promise; +function copy(srcUri: string, destUri: string, options?: CopyOptions): Promise; /** - * Copy file. + * Copy file or directory. * - * @param { string | number } src - src. - * @param { string | number } dest - dest. + * @param { string } srcUri - src uri. + * @param { string } destUri - dest uri. * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory - * @throws { BusinessError } 13900012 - Permission denied - * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900031 - Function not implemented - * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function copyFile(src: string | number, dest: string | number, callback: AsyncCallback): void; +function copy(srcUri: string, destUri: string, callback: AsyncCallback): void; /** - * Copy file. + * Copy file or directory. * - * @param { string | number } src - src. - * @param { string | number } dest - dest. - * @param { number } [mode = 0] - mode. + * @param { string } srcUri - src uri. + * @param { string } destUri - dest uri. + * @param { CopyOptions } options - options. * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory - * @throws { BusinessError } 13900012 - Permission denied - * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900031 - Function not implemented - * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function copyFile( - src: string | number, - dest: string | number, - mode: number, - callback: AsyncCallback -): void; +function copy(srcUri: string, destUri: string, options: CopyOptions, callback: AsyncCallback): void; /** - * Copy file with sync interface. + * Copy directory. * - * @param { string | number } src - src. - * @param { string | number } dest - dest. + * @param { string } src - source path. + * @param { string } dest - destination path. * @param { number } [mode = 0] - mode. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -437,436 +422,588 @@ function copyFile( * @throws { BusinessError } 13900042 - Unknown error * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function copyFileSync(src: string | number, dest: string | number, mode?: number): void; +function copyDir(src: string, dest: string, mode?: number): Promise; /** - * List file. + * Copy directory. * - * @param { string } path - path. - * @param { ListFileOptions } [options] - options. - * @returns { Promise } Returns an Array containing the name of files or directories that meet the filter criteria. - * If present, Include the subdirectory structure. + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFile( - path: string, - options?: ListFileOptions -): Promise; +function copyDir(src: string, dest: string, callback: AsyncCallback): void; /** - * List file. + * Copy directory. * - * @param { string } path - path. - * @param { AsyncCallback } callback - The callback is used to return an Array containing the name of files or directories - * that meet the filter criteria in promise mode. If present, Include the subdirectory structure. + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { number } mode - mode. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFile(path: string, callback: AsyncCallback): void; +function copyDir(src: string, dest: string, mode: number, callback: AsyncCallback): void; /** - * List file. + * Copy directory with sync interface. * - * @param { string } path - path. - * @param { ListFileOptions } [options] - options. - * @param { AsyncCallback } callback - The callback is used to return an Array containing the name of files or directories - * that meet the filter criteria in promise mode. If present, Include the subdirectory structure. + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { number } [mode = 0] - mode. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFile( - path: string, - options: ListFileOptions, - callback: AsyncCallback -): void; +function copyDirSync(src: string, dest: string, mode?: number): void; /** - * List file with sync interface. + * Copy file. * - * @param { string } path - path. - * @param { ListFileOptions } [options] - options. - * @returns { string[] } Returns an Array containing the name of files or directories that meet the filter criteria. + * @param { string | number } src - src. + * @param { string | number } dest - dest. + * @param { number } [mode = 0] - mode. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFileSync( - path: string, - options?: ListFileOptions -): string[]; +function copyFile(src: string | number, dest: string | number, mode?: number): Promise; /** - * Make dir. + * Copy file. * - * @param { string } path - path. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { string | number } src - src. + * @param { string | number } dest - dest. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdir(path: string): Promise; +function copyFile(src: string | number, dest: string | number, callback: AsyncCallback): void; /** - * Make dir. + * Copy file. * - * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { string | number } src - src. + * @param { string | number } dest - dest. + * @param { number } [mode = 0] - mode. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdir(path: string, recursion: boolean): Promise; +function copyFile( + src: string | number, + dest: string | number, + mode: number, + callback: AsyncCallback +): void; /** - * Make dir. + * Copy file with sync interface. * - * @param { string } path - path. - * @param { AsyncCallback } callback - Return the callback function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { string | number } src - src. + * @param { string | number } dest - dest. + * @param { number } [mode = 0] - mode. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdir(path: string, callback: AsyncCallback): void; +function copyFileSync(src: string | number, dest: string | number, mode?: number): void; /** - * Make dir. + * Create class Stream. * * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string } mode - mode. + * @returns { Promise } return Promise * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdir(path: string, recursion: boolean, callback: AsyncCallback): void; +function createStream(path: string, mode: string): Promise; /** - * Make dir with sync interface. + * Create class Stream. * * @param { string } path - path. + * @param { string } mode - mode. + * @param { AsyncCallback } callback - callback. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdirSync(path: string): void; +function createStream(path: string, mode: string, callback: AsyncCallback): void; /** - * Make dir with sync interface. + * Create class Stream with sync interface. * * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. + * @param { string } mode - mode. + * @returns { Stream } createStream * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function mkdirSync(path: string, recursion: boolean): void; - +function createStreamSync(path: string, mode: string): Stream; /** - * Move file. + * Create class RandomAccessFile. * - * @param { string } src - source file path. - * @param { string } dest - destination file path. - * @param { number } [mode = 0] - move mode when duplicate file name exists. - * @returns { Promise } The promise returned by the function. + * @param { string | File } file - file path, object. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @param { RandomAccessFileOptions } [options] - RandomAccessFile options + * @returns { Promise } Returns the RandomAccessFile object which has been created in promise mode. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists - * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900028 - Too many links - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ -function moveFile(src: string, dest: string, mode?: number): Promise; +function createRandomAccessFile(file: string | File, mode?: number, + options?: RandomAccessFileOptions): Promise; /** - * Move file. + * Create class RandomAccessFile. * - * @param { string } src - source file path. - * @param { string } dest - destination file path. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string | File } file - file path, object. + * @param { AsyncCallback } callback - The callback is used to return the RandomAccessFile object which has been created. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists - * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900028 - Too many links - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ -function moveFile(src: string, dest: string, callback: AsyncCallback): void; +function createRandomAccessFile(file: string | File, callback: AsyncCallback): void; /** - * Move file. + * Create class RandomAccessFile. * - * @param { string } src - source file path. - * @param { string } dest - destination file path. - * @param { number } [mode = 0] - move mode when duplicate file name exists. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string | File } file - file path, object. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @param { AsyncCallback } callback - The callback is used to return the RandomAccessFile object which has been created. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists - * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900028 - Too many links - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ -function moveFile(src: string, dest: string, mode: number, callback: AsyncCallback): void; +function createRandomAccessFile(file: string | File, mode: number, callback: AsyncCallback): void; /** - * Move file with sync interface. + * Create class RandomAccessFile with sync interface. * - * @param { string } src - source file path. - * @param { string } dest - destination file path. - * @param { number } [mode = 0] - move mode when duplicate file name exists. + * @param { string | File } file - file path, object. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @param { RandomAccessFileOptions } [options] - RandomAccessFile options + * @returns { RandomAccessFile } Returns the RandomAccessFile object which has been created. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists - * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900028 - Too many links - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ -function moveFileSync(src: string, dest: string, mode?: number): void; +function createRandomAccessFileSync(file: string | File, mode?: number, + options?: RandomAccessFileOptions): RandomAccessFile; /** - * Open file. + * Create watcher to listen for file changes. * * @param { string } path - path. - * @param { number } [mode = OpenMode.READ_ONLY] - mode. - * @returns { Promise } Returns the File object in Promise mode to record the file descriptor. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { number } events - listened events. + * @param { WatchEventListener } listener - Callback to invoke when an event of the specified type occurs. + * @returns { Watcher } Returns the Watcher object which has been created. * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900015 - File exists - * @throws { BusinessError } 13900017 - No such device * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow * @throws { BusinessError } 13900022 - Too many open files - * @throws { BusinessError } 13900023 - Text file busy - * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900029 - Resource deadlock would occur * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function createWatcher(path: string, events: number, listener: WatchEventListener): Watcher; + +/** + * Duplicate fd to File Object. + * + * @param { number } fd - fd. + * @returns { File } return File + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function dup(fd: number): File; + +/** + * Synchronize file metadata. + * + * @param { number } fd - fd. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function open(path: string, mode?: number): Promise; +function fdatasync(fd: number): Promise; /** - * Open file. + * Synchronize file metadata. * - * @param { string } path - path. - * @param { AsyncCallback } callback - The callback is used to return the File object to record the file descriptor. + * @param { number } fd - fd. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function fdatasync(fd: number, callback: AsyncCallback): void; + +/** + * Synchronize file metadata with sync interface. + * + * @param { number } fd - fd. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function fdatasyncSync(fd: number): void; + +/** + * Create class Stream by using fd. + * + * @param { number } fd - fd. + * @param { string } mode - mode. + * @returns { Promise } Returns the Stream object in promise mode. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address @@ -889,23 +1026,22 @@ function open(path: string, mode?: number): Promise; * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function open(path: string, callback: AsyncCallback): void; +function fdopenStream(fd: number, mode: string): Promise; /** - * Open file. + * Create class Stream by using fd. * - * @param { string } path - path. - * @param { number } [mode = OpenMode.READ_ONLY] - mode. - * @param { AsyncCallback } callback - The callback is used to return the File object to record the file descriptor. + * @param { number } fd - fd. + * @param { string } mode - mode. + * @param { AsyncCallback } callback - The callback is used to return the Stream object. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address @@ -928,23 +1064,22 @@ function open(path: string, callback: AsyncCallback): void; * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function open(path: string, mode: number, callback: AsyncCallback): void; +function fdopenStream(fd: number, mode: string, callback: AsyncCallback): void; /** - * Open file with sync interface. + * Create class Stream by using fd with sync interface. * - * @param { string } path - path. - * @param { number } [mode = OpenMode.READ_ONLY] - mode. - * @returns { File } Returns the File object to record the file descriptor. + * @param { number } fd - fd. + * @param { string } mode - mode. + * @returns { Stream } Returns the Stream object. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900006 - No such device or address * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address @@ -966,722 +1101,1934 @@ function open(path: string, mode: number, callback: AsyncCallback): void; * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function openSync(path: string, mode?: number): File; +function fdopenStreamSync(fd: number, mode: string): Stream; /** - * Read file. + * Synchronize file. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer } buffer - buffer. - * @param { ReadOptions } [options] - options. - * @returns { Promise } Returns the number of file bytes read to buffer in promise mode. - * @throws { BusinessError } 13900004 - Interrupted system call + * @param { number } fd - fd. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function read( - fd: number, - buffer: ArrayBuffer, - options?: ReadOptions -): Promise; +function fsync(fd: number): Promise; /** - * Read file. + * Synchronize file. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer } buffer - buffer. - * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. - * @throws { BusinessError } 13900004 - Interrupted system call + * @param { number } fd - fd. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function read(fd: number, buffer: ArrayBuffer, callback: AsyncCallback): void; +function fsync(fd: number, callback: AsyncCallback): void; /** - * Read file. + * Synchronize file with sync interface. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer } buffer - buffer. - * @param { ReadOptions } [options] - options. - * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. - * @throws { BusinessError } 13900004 - Interrupted system call + * @param { number } fd - fd. * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function read( - fd: number, - buffer: ArrayBuffer, - options: ReadOptions, - callback: AsyncCallback -): void; +function fsyncSync(fd: number): void; /** - * Read file with sync interface. + * List file. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer } buffer - buffer. - * @param { ReadOptions } [options] - options. - * @returns { number } Returns the number of file bytes read to buffer. - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @param { string } path - path. + * @param { ListFileOptions } [options] - options. + * @returns { Promise } Returns an Array containing the name of files or directories that meet the filter criteria. + * If present, Include the subdirectory structure. + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function readSync( - fd: number, - buffer: ArrayBuffer, - options?: ReadOptions -): number; +function listFile( + path: string, + options?: ListFileOptions +): Promise; /** - * Read text. + * List file. * - * @param { string } filePath - file path. - * @param { ReadTextOptions } [options] - options. - * @returns { Promise } Returns the contents of the read file in promise mode. - * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @param { string } path - path. + * @param { AsyncCallback } callback - The callback is used to return an Array containing the name of files or directories + * that meet the filter criteria in promise mode. If present, Include the subdirectory structure. + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function readText( - filePath: string, - options?: ReadTextOptions -): Promise; +function listFile(path: string, callback: AsyncCallback): void; /** - * Read text. + * List file. * - * @param { string } filePath - file path. - * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. - * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @param { string } path - path. + * @param { ListFileOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return an Array containing the name of files or directories + * that meet the filter criteria in promise mode. If present, Include the subdirectory structure. + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function readText(filePath: string, callback: AsyncCallback): void; +function listFile( + path: string, + options: ListFileOptions, + callback: AsyncCallback +): void; /** - * Read text. + * List file with sync interface. * - * @param { string } filePath - file path. - * @param { ReadTextOptions } [options] - options. - * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. - * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @param { string } path - path. + * @param { ListFileOptions } [options] - options. + * @returns { string[] } Returns an Array containing the name of files or directories that meet the filter criteria. + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function readText( - filePath: string, - options: ReadTextOptions, - callback: AsyncCallback -): void; +function listFileSync( + path: string, + options?: ListFileOptions +): string[]; /** - * Read text with sync interface. + * Reposition file offset. * - * @param { string } filePath - file path. - * @param { ReadTextOptions } [options] - options. - * @returns { string } Returns the contents of the read file. - * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @param { number } fd - file descriptor. + * @param { number } offset - file offset. + * @param { WhenceType } [whence = WhenceType.SEEK_SET] - directive whence. + * @returns { number } Returns the file offset relative to starting position of file. * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900026 - Illegal seek + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function readTextSync( - filePath: string, - options?: ReadTextOptions -): string; +function lseek(fd: number, offset: number, whence?: WhenceType): number; /** - * Delete dir. + * Stat link file. * * @param { string } path - path. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @returns { Promise } Returns the Stat object in promise mode. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900027 - Read-only file system1 * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function rmdir(path: string): Promise; +function lstat(path: string): Promise; /** - * Delete dir. + * Stat link file. * * @param { string } path - path. - * @param { AsyncCallback } callback - Return the callback function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { AsyncCallback } callback - The callback is used to return the Stat object. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900027 - Read-only file system1 * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function rmdir(path: string, callback: AsyncCallback): void; +function lstat(path: string, callback: AsyncCallback): void; /** - * Delete dir with sync interface. + * Stat link file with sync interface. * * @param { string } path - path. - * @throws { BusinessError } 13900001 - Operation not permitted + * @returns { Stat } Returns the Stat object. * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900027 - Read-only file system1 * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function rmdirSync(path: string): void; +function lstatSync(path: string): Stat; /** - * Get file information. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @returns { Promise } Returns the Stat object in promise mode. + * @param { string } path - path. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function stat(file: string | number): Promise; +function mkdir(path: string): Promise; /** - * Get file information. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { AsyncCallback } callback - The callback is used to return the Stat object. + * @param { string } path - path. + * @param { boolean } recursion - whether to recursively make directory. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function stat(file: string | number, callback: AsyncCallback): void; +function mkdir(path: string, recursion: boolean): Promise; /** - * Get file information with sync interface. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @returns { Stat } Returns the Stat object. + * @param { string } path - path. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long - * @throws { BusinessError } 13900031 - Function not implemented * @throws { BusinessError } 13900033 - Too many symbolic links encountered - * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function statSync(file: string | number): Stat; +function mkdir(path: string, callback: AsyncCallback): void; /** - * Truncate file. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. - * @returns { Promise } The promise returned by the function. + * @param { string } path - path. + * @param { boolean } recursion - whether to recursively make directory. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900023 - Text file busy - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function truncate(file: string | number, len?: number): Promise; +function mkdir(path: string, recursion: boolean, callback: AsyncCallback): void; /** - * Truncate file. + * Make dir with sync interface. * - * @param { string | number } file - path or file descriptor. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string } path - path. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900023 - Text file busy - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function truncate(file: string | number, callback: AsyncCallback): void; +function mkdirSync(path: string): void; /** - * Truncate file. + * Make dir with sync interface. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string } path - path. + * @param { boolean } recursion - whether to recursively make directory. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900023 - Text file busy - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function truncate(file: string | number, len: number, callback: AsyncCallback): void; +function mkdirSync(path: string, recursion: boolean): void; /** - * Truncate file with sync interface. + * Make temp dir. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. + * @param { string } prefix - dir prefix. + * @returns { Promise } Returns the path to the new directory in promise mode. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900023 - Text file busy - * @throws { BusinessError } 13900024 - File too large - * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function truncateSync(file: string | number, len?: number): void; +function mkdtemp(prefix: string): Promise; /** - * Delete file. + * Make temp dir. * - * @param { string } path - path. - * @returns { Promise } The promise returned by the function. + * @param { string } prefix - dir prefix. + * @param { AsyncCallback } callback - The callback is used to return the path to the new directory. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function unlink(path: string): Promise; +function mkdtemp(prefix: string, callback: AsyncCallback): void; /** - * Delete file. + * Make temp dir with sync interface. * - * @param { string } path - path. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string } prefix - dir prefix. + * @returns { string } Returns the path to the new directory. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function mkdtempSync(prefix: string): string; + +/** + * Move directory. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } [mode = 0] - move mode when duplicate file name exists. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function unlink(path: string, callback: AsyncCallback): void; +function moveDir(src: string, dest: string, mode?: number): Promise; /** - * Delete file with sync interface. + * Move directory. * - * @param { string } path - path. + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900001 - Operation not permitted * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor * @throws { BusinessError } 13900011 - Out of memory * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900016 - Cross-device link * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device * @throws { BusinessError } 13900027 - Read-only file system - * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function unlinkSync(path: string): void; +function moveDir(src: string, dest: string, callback: AsyncCallback): void; /** - * Write file. + * Move directory. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer | string } buffer - buffer. - * @param { WriteOptions } [options] - options. - * @returns { Promise } Returns the number of bytes written to the file in promise mode. + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } mode - move mode when duplicate file name exists. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function write( - fd: number, - buffer: ArrayBuffer | string, - options?: WriteOptions -): Promise; +function moveDir(src: string, dest: string, mode: number, callback: AsyncCallback): void; /** - * Write file. + * Move directory with sync interface. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer | string } buffer - buffer. - * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } [mode = 0] - move mode when duplicate file name exists. * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function write(fd: number, buffer: ArrayBuffer | string, callback: AsyncCallback): void; +function moveDirSync(src: string, dest: string, mode?: number): void; /** - * Write file. + * Move file. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer | string } buffer - buffer. - * @param { WriteOptions } [options] - options. - * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } [mode = 0] - move mode when duplicate file name exists. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function write( - fd: number, - buffer: ArrayBuffer | string, - options: WriteOptions, - callback: AsyncCallback -): void; +function moveFile(src: string, dest: string, mode?: number): Promise; /** - * Write file with sync interface. + * Move file. * - * @param { number } fd - file descriptor. - * @param { ArrayBuffer | string } buffer - buffer. - * @param { WriteOptions } [options] - options. - * @returns { number } Returns the number of bytes written to the file. + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900001 - Operation not permitted - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900024 - File too large * @throws { BusinessError } 13900025 - No space left on device - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered * @throws { BusinessError } 13900041 - Quota exceeded * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function writeSync( - fd: number, - buffer: ArrayBuffer | string, - options?: WriteOptions -): number; +function moveFile(src: string, dest: string, callback: AsyncCallback): void; /** - * File object. + * Move file. * - * @interface File + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } [mode = 0] - move mode when duplicate file name exists. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -interface File { - - /** - * @type { number } - * @readonly - * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice - * @since 20 - */ - readonly fd: number; +function moveFile(src: string, dest: string, mode: number, callback: AsyncCallback): void; - /** - * File path - * - * @type { string } - * @readonly - * @throws { BusinessError } 13900005 - I/O error +/** + * Move file with sync interface. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { number } [mode = 0] - move mode when duplicate file name exists. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function moveFileSync(src: string, dest: string, mode?: number): void; + +/** + * Open file. + * + * @param { string } path - path. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @returns { Promise } Returns the File object in Promise mode to record the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function open(path: string, mode?: number): Promise; + +/** + * Open file. + * + * @param { string } path - path. + * @param { AsyncCallback } callback - The callback is used to return the File object to record the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function open(path: string, callback: AsyncCallback): void; + +/** + * Open file. + * + * @param { string } path - path. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @param { AsyncCallback } callback - The callback is used to return the File object to record the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function open(path: string, mode: number, callback: AsyncCallback): void; + +/** + * Open file with sync interface. + * + * @param { string } path - path. + * @param { number } [mode = OpenMode.READ_ONLY] - mode. + * @returns { File } Returns the File object to record the file descriptor. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900006 - No such device or address + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900017 - No such device + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900029 - Resource deadlock would occur + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function openSync(path: string, mode?: number): File; + +/** + * Read file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { Promise } Returns the number of file bytes read to buffer in promise mode. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function read( + fd: number, + buffer: ArrayBuffer, + options?: ReadOptions +): Promise; + +/** + * Read file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function read(fd: number, buffer: ArrayBuffer, callback: AsyncCallback): void; + +/** + * Read file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function read( + fd: number, + buffer: ArrayBuffer, + options: ReadOptions, + callback: AsyncCallback +): void; + +/** + * Read file with sync interface. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { number } Returns the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readSync( + fd: number, + buffer: ArrayBuffer, + options?: ReadOptions +): number; + +/** + * Read content line by line. + * + * @param { string } filePath - file path. + * @param { Options } [options] - optional parameters + * @returns { Promise } Returns the iterator object in promise mode. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readLines(filePath: string, options?: Options): Promise; + +/** + * Read content line by line. + * + * @param { string } filePath - file path. + * @param { AsyncCallback } callback - The callback is used to return the iterator object. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readLines(filePath: string, callback: AsyncCallback): void; + +/** + * Read content line by line. + * + * @param { string } filePath - file path. + * @param { Options } options - optional parameters + * @param { AsyncCallback } callback - The callback is used to return the iterator object. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readLines(filePath: string, options: Options, callback: AsyncCallback): void; + +/** + * Read content line by line with sync interface. + * + * @param { string } filePath - file path. + * @param { Options } [options] - optional parameters + * @returns { ReaderIterator } Returns the iterator object. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readLinesSync(filePath: string, options?: Options): ReaderIterator; + +/** + * Read text. + * + * @param { string } filePath - file path. + * @param { ReadTextOptions } [options] - options. + * @returns { Promise } Returns the contents of the read file in promise mode. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readText( + filePath: string, + options?: ReadTextOptions +): Promise; + +/** + * Read text. + * + * @param { string } filePath - file path. + * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readText(filePath: string, callback: AsyncCallback): void; + +/** + * Read text. + * + * @param { string } filePath - file path. + * @param { ReadTextOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readText( + filePath: string, + options: ReadTextOptions, + callback: AsyncCallback +): void; + +/** + * Read text with sync interface. + * + * @param { string } filePath - file path. + * @param { ReadTextOptions } [options] - options. + * @returns { string } Returns the contents of the read file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function readTextSync( + filePath: string, + options?: ReadTextOptions +): string; + +/** + * Rename file. + * + * @param { string } oldPath - oldPath. + * @param { string } newPath - newPath. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function rename(oldPath: string, newPath: string): Promise; + +/** + * Rename file. + * + * @param { string } oldPath - oldPath. + * @param { string } newPath - newPath. + * @param { AsyncCallback } callback - Returns the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function rename(oldPath: string, newPath: string, callback: AsyncCallback): void; + +/** + * Rename file with sync interface. + * + * @param { string } oldPath - oldPath. + * @param { string } newPath - newPath. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900016 - Cross-device link + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900028 - Too many links + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function renameSync(oldPath: string, newPath: string): void; + +/** + * Delete dir. + * + * @param { string } path - path. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system1 + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function rmdir(path: string): Promise; + +/** + * Delete dir. + * + * @param { string } path - path. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system1 + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function rmdir(path: string, callback: AsyncCallback): void; + +/** + * Delete dir with sync interface. + * + * @param { string } path - path. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system1 + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900032 - Directory not empty + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function rmdirSync(path: string): void; + +/** + * Get file information. + * + * @param { string | number } file - path or file descriptor. + * @returns { Promise } Returns the Stat object in promise mode. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function stat(file: string | number): Promise; + +/** + * Get file information. + * + * @param { string | number } file - path or file descriptor. + * @param { AsyncCallback } callback - The callback is used to return the Stat object. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function stat(file: string | number, callback: AsyncCallback): void; + +/** + * Get file information with sync interface. + * + * @param { string | number } file - path or file descriptor. + * @returns { Stat } Returns the Stat object. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function statSync(file: string | number): Stat; + +/** + * Link file. + * + * @param { string } target - target. + * @param { string } srcPath - srcPath. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function symlink(target: string, srcPath: string): Promise; + +/** + * Link file. + * + * @param { string } target - target. + * @param { string } srcPath - srcPath. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function symlink(target: string, srcPath: string, callback: AsyncCallback): void; + +/** + * Link file with sync interface. + * + * @param { string } target - target. + * @param { string } srcPath - srcPath. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function symlinkSync(target: string, srcPath: string): void; + +/** + * Truncate file. + * + * @param { string | number } file - path or file descriptor. + * @param { number } [len = 0] - len. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function truncate(file: string | number, len?: number): Promise; + +/** + * Truncate file. + * + * @param { string | number } file - path or file descriptor. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function truncate(file: string | number, callback: AsyncCallback): void; + +/** + * Truncate file. + * + * @param { string | number } file - path or file descriptor. + * @param { number } [len = 0] - len. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function truncate(file: string | number, len: number, callback: AsyncCallback): void; + +/** + * Truncate file with sync interface. + * + * @param { string | number } file - path or file descriptor. + * @param { number } [len = 0] - len. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900023 - Text file busy + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function truncateSync(file: string | number, len?: number): void; + +/** + * Delete file. + * + * @param { string } path - path. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function unlink(path: string): Promise; + +/** + * Delete file. + * + * @param { string } path - path. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function unlink(path: string, callback: AsyncCallback): void; + +/** + * Delete file with sync interface. + * + * @param { string } path - path. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900014 - Device or resource busy + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900030 - File name too long + * @throws { BusinessError } 13900033 - Too many symbolic links encountered + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function unlinkSync(path: string): void; + +/** + * Change file mtime. + * + * @param { string } path - path. + * @param { number } mtime - last modification time + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900027 - Read-only file system + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function utimes(path: string, mtime: number): void; + +/** + * Write file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { Promise } Returns the number of bytes written to the file in promise mode. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function write( + fd: number, + buffer: ArrayBuffer | string, + options?: WriteOptions +): Promise; + +/** + * Write file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer | string } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function write(fd: number, buffer: ArrayBuffer | string, callback: AsyncCallback): void; + +/** + * Write file. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function write( + fd: number, + buffer: ArrayBuffer | string, + options: WriteOptions, + callback: AsyncCallback +): void; + +/** + * Write file with sync interface. + * + * @param { number } fd - file descriptor. + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { number } Returns the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function writeSync( + fd: number, + buffer: ArrayBuffer | string, + options?: WriteOptions +): number; + +/** + * Set extended attributes information of the file. + * + * @param { string } path - path. + * @param { string } key - the key of extended attribute. + * @param { string } value - the value of extended attribute. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function setxattr(path: string, key: string, value: string): Promise; + +/** + * Set extended attributes information of the file. + * + * @param { string } path - path. + * @param { string } key - the key of extended attribute. + * @param { string } value - the value of extended attribute. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + +function setxattrSync(path: string, key: string, value: string): void; + +/** + * Get extended attributes information of the file. + * + * @param { string } path - path. + * @param { string } key - the key of extended attribute. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900007 - Arg list too long + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900037 - No data available + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function getxattr(path: string, key: string): Promise; + +/** + * Get extended attributes information of the file with sync interface. + * + * @param { string } path - path. + * @param { string } key - the key of extended attribute. + * @returns { string } Return the value of extended attribute. + * @throws { BusinessError } 401 - Parameter error.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900007 - Arg list too long + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900037 - No data available + * @throws { BusinessError } 13900038 - Value too large for defined data type + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function getxattrSync(path: string, key: string): string; + +/** + * Progress data of copyFile + * + * @typedef Progress + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface Progress { + /** + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly processedSize: number; + + /** + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly totalSize: number; +} + +/** + * Task signal. + * + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +class TaskSignal { + /** + * Cancel the copy task in progress. + * + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900043 - No task can be canceled. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + cancel(): void; + + /** + * Subscribe the cancel event of current task. + * + * @returns { Promise } Return the result of the cancel event. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + onCancel(): Promise; +} + +/** + * Get options of copy + * + * @typedef CopyOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface CopyOptions { + /** + * Listener of copy progress + * + * @type { ?ProgressListener } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + progressListener?: ProgressListener; + /** + * Cancel signal of copy. + * + * @type { ?TaskSignal } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + copySignal?: TaskSignal; +} + +/** + * Listener of copy progress. + * + * @typedef { function } ProgressListener + * @param { Progress } progress - indicates the progress data of copyFile + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +type ProgressListener = (progress: Progress) => void; + +/** + * File object. + * + * @interface File + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface File { + + /** + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly fd: number; + + /** + * File path + * + * @type { string } + * @readonly + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @throws { BusinessError } 14300002 - Invalid URI * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly path: string; @@ -1694,7 +3041,6 @@ interface File { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly name: string; @@ -1707,7 +3053,6 @@ interface File { * @throws { BusinessError } 13900042 - Unknown error * @throws { BusinessError } 14300002 - Invalid URI * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ getParent(): string; @@ -1726,67 +3071,383 @@ interface File { * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(exclusive?: boolean): Promise; + lock(exclusive?: boolean): Promise; + + /** + * Lock file with blocking method. + * + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900043 - No record locks available + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + lock(callback: AsyncCallback): void; + + /** + * Lock file with blocking method. + * + * @param { boolean } exclusive - whether lock is exclusive. + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900043 - No record locks available + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + lock(exclusive: boolean, callback: AsyncCallback): void; + + /** + * Try to lock file with returning results immediately. + * + * @param { boolean } exclusive - whether lock is exclusive. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900043 - No record locks available + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + tryLock(exclusive?: boolean): void; + + /** + * Unlock file. + * + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900043 - No record locks available + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + unlock(): void; +} + +/** + * RandomAccessFile object. + * + * @interface RandomAccessFile + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface RandomAccessFile { + + /** + * File descriptor + * + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly fd: number; + + /** + * File pointer + * + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly filePointer: number; + + /** + * Set file pointer. + * + * @param { number } filePointer - filePointer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + setFilePointer(filePointer: number): void; + + /** + * Close randomAccessFile with sync interface. + * + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + close(): void; + + /** + * Write randomAccessFile. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { Promise } Returns the number of bytes written to the file in promise mode. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write( + buffer: ArrayBuffer | string, + options?: WriteOptions + ): Promise; + + /** + * Write randomAccessFile. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write(buffer: ArrayBuffer | string, callback: AsyncCallback): void; + + /** + * Write randomAccessFile. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write( + buffer: ArrayBuffer | string, + options: WriteOptions, + callback: AsyncCallback + ): void; + + /** + * Write randomAccessFile with sync interface. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { number } Returns the number of bytes written to the file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + writeSync( + buffer: ArrayBuffer | string, + options?: WriteOptions + ): number; + + /** + * Read randomAccessFile. + * + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { Promise } Returns the number of file bytes read to buffer in promise mode. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + read( + buffer: ArrayBuffer, + options?: ReadOptions + ): Promise; + + /** + * Read randomAccessFile. + * + * @param { ArrayBuffer } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + read(buffer: ArrayBuffer, callback: AsyncCallback): void; + + /** + * Read randomAccessFile. + * + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + read( + buffer: ArrayBuffer, + options: ReadOptions, + callback: AsyncCallback + ): void; + + /** + * Read randomAccessFile with sync interface. + * + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { number } Returns the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readSync( + buffer: ArrayBuffer, + options?: ReadOptions + ): number; +} + +/** + * The AtomicFile class provides methods for performing atomic operations on files. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export class AtomicFile { + /** + * The AtomicFile constructor. + * @param { string } path file path. + * @throws { BusinessError } 401 Parameter error.Possible causes:1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + constructor(path: string); + + /** + * Get the File object from AtomicFile object. + * @returns { File } Returns the file object. + * @throws { BusinessError } 13900002 No such file or directory + * @throws { BusinessError } 13900005 IO error + * @throws { BusinessError } 13900012 Permission denied + * @throws { BusinessError } 13900042 Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + getBaseFile(): File; /** - * Lock file with blocking method. - * - * @param { AsyncCallback } callback - Return the callback function. - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900043 - No record locks available + * Read the entire contents of the file. + * @returns { ArrayBuffer } Returns the ArrayBuffer of the file contents. + * @throws { BusinessError } 13900005 I/O error + * @throws { BusinessError } 13900042 Internal error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(callback: AsyncCallback): void; + readFully(): ArrayBuffer; /** - * Lock file with blocking method. - * - * @param { boolean } exclusive - whether lock is exclusive. - * @param { AsyncCallback } callback - Return the callback function. - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900043 - No record locks available + * If the file is written successfully, the file is closed. + * @throws { BusinessError } 13900042 Internal error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(exclusive: boolean, callback: AsyncCallback): void; + finishWrite(): void; /** - * Try to lock file with returning results immediately. - * - * @param { boolean } exclusive - whether lock is exclusive. - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900043 - No record locks available + * If writing to the file fails, the file is rolled back. + * @throws { BusinessError } 13900042 Internal error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - tryLock(exclusive?: boolean): void; + failWrite(): void; /** - * Unlock file. - * - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block - * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900043 - No record locks available + * Delete all file. + * @throws { BusinessError } 13900001 Operation not permitted + * @throws { BusinessError } 13900002 No such file or directory + * @throws { BusinessError } 13900012 Permission denied + * @throws { BusinessError } 13900027 Read-only file system + * @throws { BusinessError } 13900042 Internal error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - unlock(): void; + delete(): void; } /** @@ -1794,8 +3455,6 @@ interface File { * * @interface Stat * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ interface Stat { @@ -1806,7 +3465,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly ino: bigint; @@ -1817,8 +3475,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ readonly mode: number; @@ -1831,7 +3487,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly uid: number; @@ -1842,7 +3497,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly gid: number; @@ -1853,8 +3507,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ readonly size: number; @@ -1865,8 +3517,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ readonly atime: number; @@ -1877,8 +3527,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ readonly mtime: number; @@ -1889,7 +3537,6 @@ interface Stat { * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ readonly ctime: number; @@ -1902,126 +3549,507 @@ interface Stat { * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - readonly atimeNs?:bigint; + readonly atimeNs?:bigint; + + /** + * Returns nanosecond of the modification time. + * @type { bigint } + * @readonly + * @throws { BusinessError } 13900042 - Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly mtimeNs?:bigint; + + /** + * Returns nanosecond of the change time. + * @type { bigint } + * @readonly + * @throws { BusinessError } 13900042 - Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly ctimeNs?:bigint; + + /** + * + * @type { LocationType } + * @readonly + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly location: LocationType; + + /** + * Whether path/fd is block device. + * + * @returns { boolean } Returns whether the path/fd point to a block device or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isBlockDevice(): boolean; + + /** + * Whether path/fd is character device. + * + * @returns { boolean } Returns whether the path/fd point to a character device or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isCharacterDevice(): boolean; + + /** + * Whether path/fd is directory. + * + * @returns { boolean } Returns whether the path/fd point to a directory or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isDirectory(): boolean; + + /** + * Whether path/fd is fifo. + * + * @returns { boolean } Returns whether the path/fd point to a fifo file or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isFIFO(): boolean; + + /** + * Whether path/fd is file. + * + * @returns { boolean } Returns whether the path/fd point to a normal file or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isFile(): boolean; + + /** + * Whether path/fd is socket. + * + * @returns { boolean } Returns whether the path/fd point to a socket file or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isSocket(): boolean; + + /** + * Whether path/fd is symbolic link. + * + * @returns { boolean } Returns whether the path/fd point to a symbolic link or not. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + isSymbolicLink(): boolean; +} + +/** + * Stream object + * + * @interface Stream + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface Stream { + /** + * Close stream. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + close(): Promise; + + /** + * Close stream. + * + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + close(callback: AsyncCallback): void; + + /** + * Close stream with sync interface. + * + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + closeSync(): void; + + /** + * Flush stream. + * + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + flush(): Promise; + + /** + * Flush stream. + * + * @param { AsyncCallback } callback - Return the callback function. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + flush(callback: AsyncCallback): void; + + /** + * Flush stream with sync interface. + * + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + flushSync(): void; + + /** + * Write stream. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { Promise } Returns the number of file bytes written to file in promise mode. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write( + buffer: ArrayBuffer | string, + options?: WriteOptions + ): Promise; + + /** + * Write stream. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes written to file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write(buffer: ArrayBuffer | string, callback: AsyncCallback): void; + + /** + * Write stream. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes written to file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + write( + buffer: ArrayBuffer | string, + options: WriteOptions, + callback: AsyncCallback + ): void; /** - * Returns nanosecond of the modification time. - * @type { bigint } - * @readonly - * @throws { BusinessError } 13900042 - Internal error + * Write stream with sync interface. + * + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { number } Returns the number of file bytes written to file. + * @throws { BusinessError } 13900001 - Operation not permitted + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900024 - File too large + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900041 - Quota exceeded + * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - readonly mtimeNs?:bigint; + writeSync( + buffer: ArrayBuffer | string, + options?: WriteOptions + ): number; /** - * Returns nanosecond of the change time. - * @type { bigint } - * @readonly - * @throws { BusinessError } 13900042 - Internal error + * Read stream. + * + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { Promise } Returns the number of file bytes read to buffer in promise mode. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - readonly ctimeNs?:bigint; + read( + buffer: ArrayBuffer, + options?: ReadOptions + ): Promise; /** + * Read stream. * - * @type { LocationType } - * @readonly + * @param { ArrayBuffer } buffer - buffer. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - readonly location: LocationType; + read(buffer: ArrayBuffer, callback: AsyncCallback): void; /** - * Whether path/fd is block device. + * Read stream. * - * @returns { boolean } Returns whether the path/fd point to a block device or not. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @param { AsyncCallback } callback - The callback is used to return the number of file bytes read to buffer. + * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - isBlockDevice(): boolean; + read( + buffer: ArrayBuffer, + options: ReadOptions, + callback: AsyncCallback + ): void; /** - * Whether path/fd is character device. + * Read stream with sync interface. * - * @returns { boolean } Returns whether the path/fd point to a character device or not. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { number } Returns the number of file bytes read to file. + * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900034 - Operation would block * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900044 - Network is unreachable * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - isCharacterDevice(): boolean; + readSync( + buffer: ArrayBuffer, + options?: ReadOptions + ): number; +} +/** + * Watcher object + * + * @interface Watcher + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface Watcher { /** - * Whether path/fd is directory. + * Start watcher. * - * @returns { boolean } Returns whether the path/fd point to a directory or not. - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - isDirectory(): boolean; + start(): void; /** - * Whether path/fd is fifo. + * Stop watcher. * - * @returns { boolean } Returns whether the path/fd point to a fifo file or not. - * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900002 - No such file or directory + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900013 - Bad address + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900021 - File table overflow + * @throws { BusinessError } 13900022 - Too many open files + * @throws { BusinessError } 13900025 - No space left on device + * @throws { BusinessError } 13900030 - File name too long * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - isFIFO(): boolean; + stop(): void; +} +/** + * Enumeration of different types of whence. + * + * @enum { number } whence type + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +enum WhenceType { /** - * Whether path/fd is file. + * Starting position of the file offset. * - * @returns { boolean } Returns whether the path/fd point to a normal file or not. - * @throws { BusinessError } 13900005 - I/O error - * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - isFile(): boolean; + SEEK_SET = 0, /** - * Whether path/fd is socket. + * Current position of the file offset. * - * @returns { boolean } Returns whether the path/fd point to a socket file or not. - * @throws { BusinessError } 13900005 - I/O error - * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - isSocket(): boolean; + SEEK_CUR = 1, /** - * Whether path/fd is symbolic link. + * Ending position of the file offset. * - * @returns { boolean } Returns whether the path/fd point to a symbolic link or not. - * @throws { BusinessError } 13900005 - I/O error - * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - isSymbolicLink(): boolean; + SEEK_END = 2, } - /** * Enumeration of different types of file location. * @@ -2052,8 +4080,6 @@ enum LocationType { * * @enum { number } access mode type * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ enum AccessModeType { @@ -2061,8 +4087,6 @@ enum AccessModeType { * Check if the file exists. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ EXIST = 0, @@ -2071,8 +4095,6 @@ enum AccessModeType { * Check if the file has write permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ WRITE = 2, @@ -2081,8 +4103,6 @@ enum AccessModeType { * Check if the file has read permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ READ = 4, @@ -2091,8 +4111,6 @@ enum AccessModeType { * Check if the file has read and write permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ READ_WRITE = 6, @@ -2115,6 +4133,103 @@ enum AccessFlagType { LOCAL = 0, } +/** + * ReaderIterator object + * + * @interface ReaderIterator + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +interface ReaderIterator { + /** + * Get next result from the iterator. + * + * @returns { ReaderIteratorResult } Returns the result of reader iterator. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900037 - No data available + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + next(): ReaderIteratorResult; +} + +} + +/** + * Implements watcher event listening. + * + * @typedef { function } WatchEventListener + * @param { WatchEvent } event - Event type for the callback to invoke. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export type WatchEventListener = (event: WatchEvent) => void; + +/** + * Event Listening. + * + * @interface WatchEvent + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface WatchEvent { + /** + * File name. + * + * @type { string } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly fileName: string; + + /** + * Event happened. + * + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly event: number; + + /** + * Associated rename event. + * + * @type { number } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly cookie: number; +} + +/** + * Reader Iterator Result + * + * @interface ReaderIteratorResult + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface ReaderIteratorResult { + /** + * Whether reader iterator completes the traversal. + * + * @type { boolean } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + done: boolean; + + /** + * The value of reader iterator. + * + * @type { string } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + value: string; } /** @@ -2122,8 +4237,6 @@ enum AccessFlagType { * * @interface Filter * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface Filter { @@ -2133,8 +4246,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ suffix?: Array; @@ -2144,8 +4255,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ displayName?: Array; @@ -2155,8 +4264,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ mimeType?: Array; @@ -2166,8 +4273,6 @@ export interface Filter { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ fileSizeOver?: number; @@ -2177,8 +4282,6 @@ export interface Filter { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ lastModifiedAfter?: number; @@ -2188,19 +4291,44 @@ export interface Filter { * * @type { ?boolean } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ excludeMedia?: boolean; } +/** + * Conflict Files type + * + * @interface ConflictFiles + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface ConflictFiles { + + /** + * The path of the source file. + * + * @type { string } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + srcFile: string; + + /** + * The path of the destination file. + * + * @type { string } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + destFile: string; +} + /** * Options type * * @interface Options * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ export interface Options { @@ -2209,7 +4337,6 @@ export interface Options { * * @type { ?string } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ encoding?: string; @@ -2220,8 +4347,6 @@ export interface Options { * * @interface ReadOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface ReadOptions { @@ -2230,8 +4355,6 @@ export interface ReadOptions { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ offset?: number; @@ -2240,8 +4363,6 @@ export interface ReadOptions { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ length?: number; @@ -2253,8 +4374,6 @@ export interface ReadOptions { * @extends ReadOptions * @interface ReadTextOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface ReadTextOptions extends ReadOptions { @@ -2263,8 +4382,6 @@ export interface ReadTextOptions extends ReadOptions { * * @type { ?string } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ encoding?: string; @@ -2276,8 +4393,6 @@ export interface ReadTextOptions extends ReadOptions { * @extends Options * @interface WriteOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface WriteOptions extends Options { @@ -2286,8 +4401,6 @@ export interface WriteOptions extends Options { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ offset?: number; @@ -2296,8 +4409,6 @@ export interface WriteOptions extends Options { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ length?: number; @@ -2308,7 +4419,6 @@ export interface WriteOptions extends Options { * * @interface ListFileOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ export interface ListFileOptions { @@ -2317,7 +4427,6 @@ export interface ListFileOptions { * * @type { ?boolean } * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ recursion?: boolean; @@ -2327,7 +4436,6 @@ export interface ListFileOptions { * * @type { ?number } * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ listNum?: number; @@ -2337,10 +4445,114 @@ export interface ListFileOptions { * * @type { ?Filter } * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ filter?: Filter; } +/** + * RandomAccessFileOptions type + * + * @interface RandomAccessFileOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface RandomAccessFileOptions { + /** + * The starting position of file offset. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: number; + + /** + * The ending position of file offset. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + end?: number; +} + +/** + * ReadStreamOptions type + * + * @interface ReadStreamOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface ReadStreamOptions { + /** + * The starting range for reading a file by stream. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: number; + + /** + * The ending range for reading a file by stream. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + end?: number; +} + +/** + * WriteStreamOptions type + * + * @interface WriteStreamOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface WriteStreamOptions { + /** + * The mode for creating write stream. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + mode?: number; + /** + * The starting range for writing a file by stream. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: number; +} + +/** + * Task signal. + * @typedef { fileIo.TaskSignal } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +type TaskSignal = fileIo.TaskSignal; + +/** + * Watcher object + * @typedef { fileIo.Watcher } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +type Watcher = fileIo.Watcher; + +/** + * Watcher object + * @typedef { fileIo.AtomicFile } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +type AtomicFile = fileIo.AtomicFile; + export default fileIo; +export {TaskSignal, Watcher, AtomicFile} diff --git a/api/@ohos.file.hash.d.ts b/api/@ohos.file.hash.d.ts index e6beae59b36068a51411ee7165a6d9587189366c..9a96551be3b7c3f75b1e9513fa9e4c5a0c660492 100644 --- a/api/@ohos.file.hash.d.ts +++ b/api/@ohos.file.hash.d.ts @@ -43,8 +43,8 @@ import stream from './@ohos.util.stream'; * * @namespace hash * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @crossplatform + * @atomicservice * @since 20 * @arkts 1.1&1.2 */ @@ -186,29 +186,29 @@ declare namespace hash { update(data: ArrayBuffer): void; } - /** - * Create file read stream. - * - * @param { string } algorithm - hash algorithm. - * @returns { HashStream } Returns the ReadStream object which has been created. - * @throws { BusinessError } 401 - Parameter error - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900042 - Unknown error - * @syscap SystemCapability.FileManagement.File.FileIO - * @since 12 - */ - /** - * Create file read stream. - * - * @param { string } algorithm - hash algorithm. - * @returns { HashStream } Returns the ReadStream object which has been created. - * @throws { BusinessError } 401 - Parameter error - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900042 - Unknown error - * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @since 20 - */ + /** + * Create file read stream. + * + * @param { string } algorithm - hash algorithm. + * @returns { HashStream } Returns the ReadStream object which has been created. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 12 + */ + /** + * Create file read stream. + * + * @param { string } algorithm - hash algorithm. + * @returns { HashStream } Returns the ReadStream object which has been created. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @crossplatform + * @since 20 + */ function createHash(algorithm: string): HashStream; } diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 374a50ee0de8a77470d7c77dab1054582ec55a6c..a86f2cbbd6cdef6bcbfd68cc759fce275ea420f9 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -102,7 +102,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @StageModelOnly - * @crossplatform * @since 19 */ function getPhotoAccessHelper(context: Context, userId: number): PhotoAccessHelper; @@ -1562,6 +1561,7 @@ declare namespace photoAccessHelper { * @systemapi * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#open */ open(mode: string, callback: AsyncCallback): void; /** @@ -1580,6 +1580,7 @@ declare namespace photoAccessHelper { * @systemapi * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#open */ open(mode: string): Promise; /** @@ -1595,6 +1596,7 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#open */ getReadOnlyFd(callback: AsyncCallback): void; /** @@ -1610,6 +1612,7 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#open */ getReadOnlyFd(): Promise; /** @@ -1624,6 +1627,7 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#close */ close(fd: number, callback: AsyncCallback): void; /** @@ -1638,6 +1642,7 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 * @deprecated since 11 + * @useinstead ohos.file.fs/fileIo#close */ close(fd: number): Promise; /** @@ -1653,6 +1658,20 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ + /** + * Obtains the thumbnail of this file. This API uses an asynchronous callback to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { AsyncCallback } callback - Callback used to return the PixelMap of the thumbnail. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ getThumbnail(callback: AsyncCallback): void; /** * Obtains the file thumbnail of the given size. This API uses an asynchronous callback to return the result. @@ -1668,6 +1687,21 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ + /** + * Obtains the file thumbnail of the given size. This API uses an asynchronous callback to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { image.Size } size - Size of the thumbnail. + * @param { AsyncCallback } callback - Callback used to return the PixelMap of the thumbnail. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ getThumbnail(size: image.Size, callback: AsyncCallback): void; /** * Obtains the file thumbnail of the given size. This API uses a promise to return the result. @@ -1684,6 +1718,22 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ + /** + * Obtains the file thumbnail of the given size. This API uses a promise to return the result. + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { image.Size } [size] - Size of the thumbnail. + * @returns { Promise } Returns the thumbnail's pixelMap. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ getThumbnail(size?: image.Size): Promise; /** * Obtains the ArrayBuffer of a file thumbnail by specifying its type. This API uses a promise to return the result. @@ -1711,7 +1761,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -1730,7 +1780,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -1749,7 +1799,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -1768,7 +1818,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -1787,7 +1837,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -1806,7 +1856,7 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -2015,6 +2065,29 @@ declare namespace photoAccessHelper { * @arkts 1.1&1.2 */ convertImageFormat(title: string, imageFormat: SupportedImageFormat): Promise; + /** + * Create a compatibility copy of the asset for applications that do not support the encoding format. + * The current HEIF image will generate a JPEG image when this interface is called. + * The API supports media types include normal picture,movingphoto(only picture part), and burst photo, + * but video is not included. + * The API supports image format incluse heif and heic. + * + * @permission ohos.permission.WRITE_IMAGEVIDEO + * @returns { Promise } Returns the void + * @throws { BusinessError } 201 - Permission denied + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes: + * 1. The original file does not exist locally in PhotoAsset; + * 2. The original file format is not within the supported rrange + * 3. The original file is a temporary file or is being editted; + * @throws { BusinessError } 23800301 - Internal systerm error.It is recommended to retry and check the + * logs.Possible causes: + * 1. Database corrupted.2. The file system is abnorma1.3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 20 + */ + createTemporaryCompatibleDuplicate(): Promise; /** * Opens the source file to obtain the FD. This API uses an asynchronous callback to return the result. * @@ -2061,7 +2134,7 @@ declare namespace photoAccessHelper { * @systemapi * @since 11 */ - commitEditedAsset(editData: string, uri: string, callback: AsyncCallback); + commitEditedAsset(editData: string, uri: string, callback: AsyncCallback): void; /** * Commits the edited image or video asset. This API uses a promise to return the result. * @@ -2093,7 +2166,7 @@ declare namespace photoAccessHelper { * @systemapi * @since 11 */ - revertToOriginal(callback: AsyncCallback); + revertToOriginal(callback: AsyncCallback): void; /** * Reverts to the state of the file before being edited. This API uses a promise to return the result. * @@ -2836,7 +2909,34 @@ declare namespace photoAccessHelper { * @systemapi * @since 19 */ - SUM_SIZE = 'sum(size)' + SUM_SIZE = 'sum(size)', + /** + * orientation in exif + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + EXIF_ROTATE = 'exif_rotate', + /** + * AppLink state of assets, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 21 + * @arkts 1.1&1.2 + */ + HAS_APPLINK = 'has_applink', + /** + * AppLink info of assets, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 21 + * @arkts 1.1&1.2 + */ + APPLINK = 'applink' } /** @@ -5946,7 +6046,6 @@ declare namespace photoAccessHelper { *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ on(type: 'photoChange', callback: Callback): void; @@ -5963,7 +6062,6 @@ declare namespace photoAccessHelper { *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ off(type: 'photoChange', callback?: Callback): void; @@ -5982,7 +6080,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ on(type: 'hiddenPhotoChange', callback: Callback): void; @@ -6001,7 +6098,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ off(type: 'hiddenPhotoChange', callback?: Callback): void; @@ -6020,7 +6116,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ on(type: 'trashedPhotoChange', callback: Callback): void; @@ -6039,7 +6134,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ off(type: 'trashedPhotoChange', callback?: Callback): void; @@ -6056,7 +6150,6 @@ declare namespace photoAccessHelper { *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ on(type: 'photoAlbumChange', callback: Callback): void; @@ -6073,7 +6166,6 @@ declare namespace photoAccessHelper { *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ off(type: 'photoAlbumChange', callback?: Callback): void; @@ -6092,7 +6184,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ on(type: 'hiddenAlbumChange', callback: Callback): void; @@ -6111,7 +6202,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ off(type: 'hiddenAlbumChange', callback?: Callback): void; @@ -6130,7 +6220,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ on(type: 'trashedAlbumChange', callback: Callback): void; @@ -6149,7 +6238,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ off(type: 'trashedAlbumChange', callback?: Callback): void; @@ -6165,6 +6253,21 @@ declare namespace photoAccessHelper { */ getPhotoPickerComponentDefaultAlbumName(): Promise; + /** + * checks whether the application supports compatiblle copies by bundleName + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { string } bundleName - BundleName of target applicaation + * @returns { Promise } - Returns the whether appplication supports compatible copies + * @throws {BusinessError } 201 - Permission denied + * @throws {BusinessError } 202 - Called by non-system aapplication + * @throws {BusinessError } 23800301 - Internal system eerror. It is recommended to retry and check the logs + *
Possible causes: 1. The IPC request timed out. 2.system running error + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 20 + */ + isCompatibleDuplicateSupported(bundleName: string): Promise; + /** * Obtains photo albums based on the specified options. This API uses a promise to return the result. * Before the operation, ensure that the albums to obtain exist. @@ -6179,7 +6282,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ getPhotoAlbums(options?: FetchOptions): Promise>; @@ -6199,7 +6301,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ getPhotoAlbumOrder(orderStyle: number, options?: FetchOptions): Promise>; @@ -6219,9 +6320,143 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ setPhotoAlbumOrder(orderStyle: number, albumOrders: Array): Promise; + + /** + * Get recent photo or video info by options + * + * @param { RecentPhotoOptions } [options] - options for recent photo + * @returns { Promise } - Returns the recent photo info + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + getRecentPhotoInfo(options?: RecentPhotoOptions): Promise; + + /** + * Queries data in the database based on specified conditions. + * + * @permission ohos.permission.ACCESS_MEDIALIB_THUMB_DB + * @param { string } sql - The query conditions. + * @returns { Promise } The {@link ResultSet} object if the operation is successful. + * @throws { BusinessError } 201 - Permission denied + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800151 - The scenario parameter verification fails. + *
Possible causes: The SQL statement is abnormal. + * @throws { BusinessError } 23800301 - Internal system error. You are advised to retry and check the logs. + *
Possible causes: 1. The database is corrupted. 2. The file system is abnormal. 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + query(sql: string): Promise; + } + + /** + * RecentPhotoOptions Object + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + export class RecentPhotoOptions { + /** + * Support set period time + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + period?: number; + + /** + * The type of the file in the recent photo window. + * + * @type { ?photoAccessHelper.PhotoViewMIMETypes } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + MIMEType?: photoAccessHelper.PhotoViewMIMETypes; + + /** + * PhotoSource + * + * @type { ?PhotoSource } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + photoSource?: PhotoSource; + } + + /** + * Recent photo info + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + export class RecentPhotoInfo { + /** + * The dateTaken of photos or videos + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + dateTaken?: number; + + /** + * The identifier of photos or videos + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + identifier?: string; + } + + /** + * Enumeration of PhotoSource type + * + * @enum { number } PhotoSource + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + export enum PhotoSource { + /** + * all resource + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + ALL = 0, + + /** + * camera resource + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + CAMERA = 1, + + /** + * screenshot resource + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + SCREENSHOT = 2 } /** @@ -6231,7 +6466,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ enum ThumbnailChangeStatus { /** @@ -6240,7 +6474,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_NOT_EXISTS = 0, @@ -6250,7 +6483,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_ADD = 1, @@ -6260,7 +6492,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_UPDATE = 2, @@ -6270,7 +6501,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_NOT_CHANGE = 3 } @@ -6282,7 +6512,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ enum StrongAssociationType { /** @@ -6291,7 +6520,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ NORMAL = 0, /** @@ -6300,7 +6528,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ CLOUD_ENHANCEMENT = 1 } @@ -6311,7 +6538,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeInfos * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeInfos { /** @@ -6320,7 +6546,6 @@ declare namespace photoAccessHelper { * @type { NotifyChangeType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ type: NotifyChangeType; @@ -6330,7 +6555,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeData[] | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetChangeDatas: PhotoAssetChangeData[] | null; @@ -6340,7 +6564,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isForRecheck: boolean; } @@ -6351,7 +6574,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeData * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeData { /** @@ -6360,7 +6582,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetBeforeChange: PhotoAssetChangeInfo | null; @@ -6370,7 +6591,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetAfterChange: PhotoAssetChangeInfo | null; @@ -6380,7 +6600,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isContentChanged: boolean; @@ -6390,7 +6609,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isDeleted: boolean; @@ -6401,7 +6619,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ thumbnailChangeStatus: ThumbnailChangeStatus; @@ -6412,7 +6629,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ version: number; } @@ -6423,7 +6639,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeInfo * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeInfo { /** @@ -6432,7 +6647,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ uri: string; @@ -6442,7 +6656,6 @@ declare namespace photoAccessHelper { * @type { PhotoType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ mediaType: PhotoType; @@ -6452,7 +6665,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumUri: string; @@ -6463,7 +6675,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ fileId: number; @@ -6474,7 +6685,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateDay: string; @@ -6485,7 +6695,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isFavorite: boolean; @@ -6496,7 +6705,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isHidden: boolean; @@ -6507,7 +6715,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ strongAssociation: StrongAssociationType; @@ -6518,7 +6725,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ thumbnailVisible: ThumbnailVisibility; @@ -6529,7 +6735,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateTrashedMs: number; @@ -6540,7 +6745,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateAddedMs: number; @@ -6551,9 +6755,38 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateTakenMs: number; + + /** + * asset position. + * + * @type { ?PositionType } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + */ + position?: PositionType; + + /** + * Display name of photo asset. + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + */ + displayName?: string; + + /** + * Size of photo asset. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + */ + size?: number; } /** @@ -6562,7 +6795,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeInfos * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeInfos { /** @@ -6571,7 +6803,6 @@ declare namespace photoAccessHelper { * @type { NotifyChangeType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ type: NotifyChangeType; @@ -6581,7 +6812,6 @@ declare namespace photoAccessHelper { * @type { AlbumChangeData[] | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumChangeDatas: AlbumChangeData[] | null; @@ -6591,7 +6821,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isForRecheck: boolean; } @@ -6602,7 +6831,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeData * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeData { /** @@ -6611,7 +6839,6 @@ declare namespace photoAccessHelper { * @type { AlbumChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumBeforeChange: AlbumChangeInfo | null; @@ -6621,20 +6848,9 @@ declare namespace photoAccessHelper { * @type { AlbumChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumAfterChange: AlbumChangeInfo | null; - /** - * Whether the album is deleted. - * - * @type { boolean } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 20 - * @arkts 1.1&1.2 - */ - isDeleted: boolean; - /** * The version of the album info used to determine the order of notification changes. * @@ -6642,7 +6858,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ version: number; } @@ -6653,7 +6868,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeInfo * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeInfo { /** @@ -6662,7 +6876,6 @@ declare namespace photoAccessHelper { * @type { AlbumType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumType: AlbumType; @@ -6672,7 +6885,6 @@ declare namespace photoAccessHelper { * @type { AlbumSubtype } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumSubtype: AlbumSubtype; @@ -6682,7 +6894,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumName: string; @@ -6692,7 +6903,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumUri: string; @@ -6702,7 +6912,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ imageCount: number; @@ -6712,7 +6921,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ videoCount: number; @@ -6722,7 +6930,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ count: number; @@ -6732,7 +6939,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ coverUri: string; @@ -6743,7 +6949,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCount: number; @@ -6754,7 +6959,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCoverUri: string; @@ -6765,7 +6969,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isCoverChanged: boolean; @@ -6776,7 +6979,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isHiddenCoverChanged: boolean; @@ -6787,7 +6989,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ coverInfo?: PhotoAssetChangeInfo; @@ -6798,9 +6999,26 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCoverInfo?: PhotoAssetChangeInfo; + + /** + * The order section of album asset. + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + */ + orderSection?: number; + + /** + * The album order of album asset. + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + */ + albumOrder?: number; } /** @@ -7414,6 +7632,29 @@ declare namespace photoAccessHelper { * @since 19 */ videoDurationFilter?: VideoDurationFilter; + + /** + * Configures filter conditions as a string array, supporting multiple combined + * conditions to specify supported file types. When this parameter is set, the + * original file type configuration parameters `MIMEType` and `mimeTypeFilter` become invalid. + * + * @type { ?Array } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + combinedMediaTypeFilter?: Array; + + /** + * Media file type and size combined filtering configuration. The array supports a maximum length of 3. + * Setting this parameter will cause the `fileSizeFilter` and `MIMEType` parameters to be ignored. + * + * @type { ?Array } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + photoViewMimeTypeFileSizeFilters?: Array; } /** @@ -7513,6 +7754,35 @@ declare namespace photoAccessHelper { extraVideoDuration?: number; } + /** + * Media file video duration filtering configuration. + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + class PhotoViewMimeTypeFileSizeFilter { + /** + * Specifing filter Type. + * + * @type { PhotoViewMIMETypes } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + photoViewMimeType: PhotoViewMIMETypes; + + /** + * Specifing file size filtering configuration. + * + * @type { FileSizeFilter } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + sizeFilter: FileSizeFilter; + } + /** * PhotoSelectOptions Object * @@ -8652,6 +8922,32 @@ declare namespace photoAccessHelper { * @since 19 */ static deleteLocalAssetsPermanentlyWithUri(context: Context, assetUris: Array): Promise; + + /** + * Set the AppLink state of this asset. + * + * @param { int } hasAppLink - AppLink state of the asset to set. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error.It is recommended to retry and check the logs. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 21 + * @arkts 1.1&1.2 + */ + setHasAppLink(hasAppLink: int): void; + + /** + * Set the AppLink info of this asset. + * + * @param { string } appLink - AppLink info of the asset to set. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error.It is recommended to retry and check the logs. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 21 + * @arkts 1.1&1.2 + */ + setAppLinkInfo(appLink: string): void; } /** @@ -10824,6 +11120,161 @@ declare namespace photoAccessHelper { */ addLcdJumpCount(ids: Array): Promise>; } + + /** + * Indicates possible value types + * + * @typedef { number | string | boolean | Uint8Array | null } ValueType + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + type ValueType = number | string | boolean | Uint8Array | null; + + /** + * Values in buckets are stored in key-value pairs, change {[key: string]: ValueType;} to Record + * + * @typedef { Record } ValuesBucket + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + type ValuesBucket = Record; + + /** + * Provides methods for accessing a database result set generated by querying the database. + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + class ResultSet { + /** + * Obtains the number of columns in the result set. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + columnCount: number; + /** + * Obtains the number of rows in the result set. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + rowCount: number; + /** + * Obtains the current index of the result set. + * + * @type { number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + rowIndex: number; + /** + * Checks whether the cursor is positioned at the last row. + * + * @type { boolean } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + isAtLastRow: boolean; + /** + * Go to the specified row of the result set. + * + * @param { number } position - Indicates the index of the specified row, which starts from 0. + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes: position invalid. + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + goToRow(position: number): boolean; + /** + * Go to the first row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + goToFirstRow(): boolean; + /** + * Go to the next row of the result set. + * + * @returns { boolean } True if the result set is moved successfully; Returns false otherwise. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + goToNextRow(): boolean; + /** + * Obtains the values of all columns in the specified row. + * + * @returns { ValuesBucket } Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + getRow(): ValuesBucket; + /** + * Obtains the value of the specified column in the current row. + * + * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { ValueType } The value of the specified column.. + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800151 - Scene parameters validate failed, possible causes: columnIndex invalid. + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + getValue(columnIndex: number): ValueType; + /** + * Closes the result set. + * + * @throws { BusinessError } 202 - Called by non-system application + * @throws { BusinessError } 23800301 - Internal system error. It is recommended to retry and check the logs. + *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @systemapi + * @since 22 + * @arkts 1.1&1.2 + */ + close(): void; + } + } export default photoAccessHelper; diff --git a/api/@ohos.file.sendablePhotoAccessHelper.d.ets b/api/@ohos.file.sendablePhotoAccessHelper.d.ets index 12926ba042434e74ef2b54cf4295ee2ac15d7b1c..97c94ab70e23f62d5899c70a718d7d1e78da6ab8 100644 --- a/api/@ohos.file.sendablePhotoAccessHelper.d.ets +++ b/api/@ohos.file.sendablePhotoAccessHelper.d.ets @@ -59,7 +59,6 @@ declare namespace sendablePhotoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @StageModelOnly - * @crossplatform * @since 19 */ function getPhotoAccessHelper(context: Context, userId: number): PhotoAccessHelper; diff --git a/api/@ohos.file.statvfs.d.ts b/api/@ohos.file.statvfs.d.ts index 870676443a1bb0be163bd94503ef369f5695de6f..ceadd105343efd2fb43134452e9bc7305e2e82d6 100644 --- a/api/@ohos.file.statvfs.d.ts +++ b/api/@ohos.file.statvfs.d.ts @@ -34,6 +34,7 @@ import type { AsyncCallback } from './@ohos.base'; * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ declare namespace statfs { /** @@ -78,6 +79,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getFreeSize(path: string): Promise; @@ -123,6 +125,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getFreeSize(path: string, callback: AsyncCallback): void; @@ -168,6 +171,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getFreeSizeSync(path: string): number; @@ -213,6 +217,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getTotalSize(path: string): Promise; @@ -258,6 +263,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getTotalSize(path: string, callback: AsyncCallback): void; @@ -303,6 +309,7 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function getTotalSizeSync(path: string): number; } diff --git a/api/@ohos.font.d.ets b/api/@ohos.font.d.ets deleted file mode 100644 index 13654ce8ed0c457d28cfc7973a7b905236b75c24..0000000000000000000000000000000000000000 --- a/api/@ohos.font.d.ets +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Copyright (c) 2022-2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -import { Resource } from './global/resource' -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare namespace font { - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontOptions { - - /** - * The font name to register. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familyName: string | Resource; - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familySrc: string | Resource; - } - - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontInfo { - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - path: string; - - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - postScriptName: string; - - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fullName: string; - - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - family: string; - - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - subfamily: string; - - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - weight: number; - - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - width: number; - - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - italic: boolean; - - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - monoSpace: boolean; - - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - symbolic: boolean; - } - - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontConfig { - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontDir: Array; - - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - generic: Array; - - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallbackGroups: Array; - } - - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontGenericInfo { - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - alias: Array; - - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - adjust: Array; - } - - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAliasInfo { - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - name: string; - - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - } - - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAdjustInfo { - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - to: number; - } - - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackGroupInfo { - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontSetName: string; - - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallback: Array; - } - - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackInfo { - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - language: string; - - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - } - - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function registerFont(options: FontOptions): void; - - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getSystemFontList(): Array; - - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getFontByName(fontName: string): FontInfo; - - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function getUIFontConfig(): UIFontConfig; -} - -export default font; \ No newline at end of file diff --git a/api/@ohos.font.d.ts b/api/@ohos.font.d.ts index 4a8422fd69866d2cda2a8c382a37841b5c387f0c..3bddff9027228945f0b911560d625daecb14133c 100644 --- a/api/@ohos.font.d.ts +++ b/api/@ohos.font.d.ts @@ -17,6 +17,9 @@ * @file * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from './global/resource' +/*** endif */ /** * @namespace font @@ -34,7 +37,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace font { /** @@ -53,7 +57,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FontOptions { @@ -86,7 +91,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ familyName: string | Resource; @@ -119,7 +125,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ familySrc: string | Resource; } @@ -140,7 +147,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FontInfo { @@ -166,7 +174,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ path: string; @@ -192,7 +201,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ postScriptName: string; @@ -218,7 +228,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fullName: string; @@ -244,7 +255,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ family: string; @@ -270,7 +282,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subfamily: string; @@ -296,7 +309,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ weight: number; @@ -322,7 +336,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -348,7 +363,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ italic: boolean; @@ -374,7 +390,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ monoSpace: boolean; @@ -400,7 +417,8 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ symbolic: boolean; } @@ -414,7 +432,8 @@ declare namespace font { * @typedef UIFontConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontConfig { /** @@ -428,7 +447,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontDir: Array; @@ -443,7 +463,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ generic: Array; @@ -458,7 +479,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fallbackGroups: Array; } @@ -472,7 +494,8 @@ declare namespace font { * @typedef UIFontGenericInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontGenericInfo { /** @@ -486,7 +509,8 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ family: string; @@ -501,7 +525,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alias: Array; @@ -516,7 +541,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ adjust: Array; } @@ -530,7 +556,8 @@ declare namespace font { * @typedef UIFontAliasInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontAliasInfo { /** @@ -544,7 +571,8 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -561,7 +589,8 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ weight: number; } @@ -575,7 +604,8 @@ declare namespace font { * @typedef UIFontAdjustInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontAdjustInfo { /** @@ -589,7 +619,8 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ weight: number; /** @@ -603,7 +634,8 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ to: number; } @@ -617,7 +649,8 @@ declare namespace font { * @typedef UIFontFallbackGroupInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontFallbackGroupInfo { /** @@ -633,7 +666,8 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSetName: string; @@ -648,7 +682,8 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fallback: Array; } @@ -662,7 +697,8 @@ declare namespace font { * @typedef UIFontFallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface UIFontFallbackInfo { /** @@ -676,7 +712,8 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ language: string; @@ -691,7 +728,8 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ family: string; } @@ -796,7 +834,8 @@ declare namespace font { * @returns { UIFontConfig } Returns the ui font config * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getUIFontConfig(): UIFontConfig; } diff --git a/api/@ohos.geoLocationManager.d.ts b/api/@ohos.geoLocationManager.d.ts index d5413e5ba80581a42ab472f4701195a744a2580c..871bb0be9309fd0ea65e9ed8d1e6ab18db495d4e 100644 --- a/api/@ohos.geoLocationManager.d.ts +++ b/api/@ohos.geoLocationManager.d.ts @@ -22,9 +22,10 @@ import { AsyncCallback, Callback } from './@ohos.base'; /*** if arkts 1.1 */ import { WantAgent } from './@ohos.wantAgent'; /*** endif */ -/*** if arkts 1.1 */ -import { NotificationRequest } from './notification/notificationRequest'; +/*** if arkts 1.2 */ +import { WantAgent } from '@ohos.app.ability.wantAgent'; /*** endif */ +import { NotificationRequest } from './notification/notificationRequest'; /** * Provides interfaces for acquiring location information, managing location switches, @@ -108,7 +109,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'locationChange', request: LocationRequest | ContinuousLocationRequest, callback: Callback): void; @@ -156,7 +158,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'locationChange', callback?: Callback): void; @@ -172,7 +175,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'locationError', callback: Callback): void; @@ -188,7 +192,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'locationError', callback?: Callback): void; @@ -201,7 +206,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.on('locationEnabledChange')} due to limited device capabilities. * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'locationEnabledChange', callback: Callback): void; @@ -214,7 +220,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locationEnabledChange')} due to limited device capabilities. * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'locationEnabledChange', callback?: Callback): void; @@ -247,7 +254,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'cachedGnssLocationsChange', request: CachedGnssLocationsRequest, callback: Callback>): void; @@ -278,7 +286,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'cachedGnssLocationsChange', callback?: Callback>): void; @@ -294,7 +303,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'satelliteStatusChange', callback: Callback): void; @@ -310,7 +320,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'satelliteStatusChange', callback?: Callback): void; @@ -326,7 +337,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'nmeaMessage', callback: Callback): void; @@ -342,7 +354,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'nmeaMessage', callback?: Callback): void; @@ -392,7 +405,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301500 - Failed to query the area information. * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'countryCodeChange', callback: Callback): void; @@ -406,7 +420,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301500 - Failed to query the area information. * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'countryCodeChange', callback?: Callback): void; @@ -425,7 +440,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301800 - Failed to start WiFi or Bluetooth scanning. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'locatingRequiredDataChange', config: LocatingRequiredDataConfig, callback: Callback>): void; @@ -441,7 +457,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('locatingRequiredDataChange')} due to limited device capabilities. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'locatingRequiredDataChange', callback?: Callback>): void; @@ -456,7 +473,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'locationIconStatusChange', callback: Callback): void; @@ -471,7 +489,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'locationIconStatusChange', callback?: Callback): void; @@ -487,7 +506,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301100 - The location switch is off. * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'bluetoothScanResultChange', callback: Callback): void; @@ -502,7 +522,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.off('bluetoothScanResultChange')} due to limited device capabilities. * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'bluetoothScanResultChange', callback?: Callback): void; @@ -665,7 +686,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301200 - Failed to obtain the geographical location. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getLastLocation(): Location; @@ -686,7 +708,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function isLocationEnabled(): boolean; @@ -730,7 +753,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ function enableLocation(callback: AsyncCallback): void; @@ -758,7 +782,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ function enableLocation(): Promise; @@ -800,7 +825,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ function disableLocation(): void; @@ -845,7 +871,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301300 - Reverse geocoding query failed. * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback>): void; @@ -859,7 +886,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @throws { BusinessError } 3301300 - Reverse geocoding query failed. * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getAddressesFromLocation(request: ReverseGeoCodeRequest): Promise>; @@ -1190,7 +1218,8 @@ declare namespace geoLocationManager { * @throws { BusinessError } 3301000 - The location service is unavailable. * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isLocationPrivacyConfirmed(type: LocationPrivacyType): boolean; @@ -1338,6 +1367,53 @@ declare namespace geoLocationManager { */ function getPoiInfo(): Promise; + /** + * Add a beacon fence. + * + * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION + * @param { BeaconFenceRequest } fenceRequest - Indicates the details of the beacon fence. + * @returns { Promise } The promise returned by the function, for reporting the ID of beacon fence. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the + * permission required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.addBeaconFence} + * due to limited device capabilities. + * @throws { BusinessError } 3501100 - Failed to add a beacon fence because the location switch is off. + * @throws { BusinessError } 3501101 - Failed to add a beacon fence because the bluetooth switch is off. + * @throws { BusinessError } 3501601 - The number of beacon fence exceeds the maximum. + * @throws { BusinessError } 3501603 - Duplicate beacon fence information. + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + function addBeaconFence(fenceRequest: BeaconFenceRequest): Promise; + + /** + * Remove a beacon fence. + * + * @permission ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION + * @param { BeaconFence } [beaconFence] - Indicates the details of the beacon fence. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call ${geoLocationManager.removeBeaconFence} + * due to limited device capabilities. + * @throws { BusinessError } 3501602 - Failed to delete the fence due to incorrect beacon fence information. + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + function removeBeaconFence(beaconFence?: BeaconFence): Promise; + + /** + * Check whether the BeaconFence service is supported. + * + * @returns { boolean } Returns {@code true} if BeaconFence service is available, returns {@code false} otherwise. + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + function isBeaconFenceSupported(): boolean; + /** * Configuration parameters for simulating reverse geocoding. * @@ -1403,7 +1479,8 @@ declare namespace geoLocationManager { * * @typedef SatelliteStatusInfo * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface SatelliteStatusInfo { /** @@ -1411,7 +1488,8 @@ declare namespace geoLocationManager { * * @type { number } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ satellitesNumber: number; @@ -1420,7 +1498,8 @@ declare namespace geoLocationManager { * * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ satelliteIds: Array; @@ -1429,7 +1508,8 @@ declare namespace geoLocationManager { * * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ carrierToNoiseDensitys: Array; @@ -1438,7 +1518,8 @@ declare namespace geoLocationManager { * * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ altitudes: Array; @@ -1447,7 +1528,8 @@ declare namespace geoLocationManager { * * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ azimuths: Array; @@ -1456,7 +1538,8 @@ declare namespace geoLocationManager { * * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ carrierFrequencies: Array; @@ -1465,7 +1548,8 @@ declare namespace geoLocationManager { * * @type { ?Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ satelliteConstellation?: Array; @@ -1474,7 +1558,8 @@ declare namespace geoLocationManager { * * @type { ?Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ satelliteAdditionalInfo?: Array; } @@ -1484,7 +1569,8 @@ declare namespace geoLocationManager { * * @typedef CachedGnssLocationsRequest * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface CachedGnssLocationsRequest { /** @@ -1492,7 +1578,8 @@ declare namespace geoLocationManager { * * @type { number } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ reportingPeriodSec: number; @@ -1501,7 +1588,8 @@ declare namespace geoLocationManager { * * @type { boolean } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ wakeUpCacheQueueFull: boolean; } @@ -1637,7 +1725,8 @@ declare namespace geoLocationManager { * * @typedef ReverseGeoCodeRequest * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ReverseGeoCodeRequest { /** @@ -1645,7 +1734,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ locale?: string; @@ -1654,7 +1744,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ country?: string; @@ -1663,7 +1754,8 @@ declare namespace geoLocationManager { * * @type { number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ latitude: number; @@ -1672,7 +1764,8 @@ declare namespace geoLocationManager { * * @type { number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ longitude: number; @@ -1681,7 +1774,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ maxItems?: number; } @@ -1691,7 +1785,8 @@ declare namespace geoLocationManager { * * @typedef GeoCodeRequest * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface GeoCodeRequest { /** @@ -1699,7 +1794,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ locale?: string; @@ -1708,7 +1804,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ country?: string; @@ -1717,7 +1814,8 @@ declare namespace geoLocationManager { * * @type { string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ description: string; @@ -1726,7 +1824,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ maxItems?: number; @@ -1735,7 +1834,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ minLatitude?: number; @@ -1744,7 +1844,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ minLongitude?: number; @@ -1753,7 +1854,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ maxLatitude?: number; @@ -1762,7 +1864,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ maxLongitude?: number; } @@ -1772,7 +1875,8 @@ declare namespace geoLocationManager { * * @typedef GeoAddress * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface GeoAddress { /** @@ -1782,7 +1886,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ latitude?: number; @@ -1793,7 +1898,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ longitude?: number; @@ -1803,7 +1909,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ locale?: string; @@ -1812,7 +1919,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ placeName?: string; @@ -1821,7 +1929,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ countryCode?: string; @@ -1830,7 +1939,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ countryName?: string; @@ -1839,7 +1949,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ administrativeArea?: string; @@ -1848,7 +1959,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ subAdministrativeArea?: string; @@ -1857,7 +1969,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ locality?: string; @@ -1866,7 +1979,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ subLocality?: string; @@ -1875,7 +1989,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ roadName?: string; @@ -1884,7 +1999,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ subRoadName?: string; @@ -1893,7 +2009,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ premises?: string; @@ -1902,7 +2019,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ postalCode?: string; @@ -1911,7 +2029,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ phoneNumber?: string; @@ -1920,7 +2039,8 @@ declare namespace geoLocationManager { * * @type { ?string } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ addressUrl?: string; @@ -1929,7 +2049,8 @@ declare namespace geoLocationManager { * * @type { ?Array } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ descriptions?: Array; @@ -1938,7 +2059,8 @@ declare namespace geoLocationManager { * * @type { ?number } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ descriptionsSize?: number; @@ -1948,7 +2070,8 @@ declare namespace geoLocationManager { * @type { ?Boolean } * @syscap SystemCapability.Location.Location.Geocoder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ isFromMock?: Boolean; } @@ -1966,7 +2089,8 @@ declare namespace geoLocationManager { * @typedef LocationRequest * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface LocationRequest { /** @@ -1982,7 +2106,8 @@ declare namespace geoLocationManager { * @type { ?LocationRequestPriority } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ priority?: LocationRequestPriority; @@ -1999,7 +2124,8 @@ declare namespace geoLocationManager { * @type { ?LocationRequestScenario } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scenario?: LocationRequestScenario; @@ -2016,7 +2142,8 @@ declare namespace geoLocationManager { * @type { ?number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ timeInterval?: number; @@ -2033,7 +2160,8 @@ declare namespace geoLocationManager { * @type { ?number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ distanceInterval?: number; @@ -2050,7 +2178,8 @@ declare namespace geoLocationManager { * @type { ?number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxAccuracy?: number; } @@ -2170,6 +2299,15 @@ declare namespace geoLocationManager { * @since 12 */ transitionEvent: GeofenceTransitionEvent; + + /** + * Indicate the beaconFence which transitionEvent occurs. + * + * @type { ?BeaconFence } + * @syscap SystemCapability.Location.Location.Geofence + * @since 20 + */ + beaconFence?: BeaconFence; } /** @@ -2178,7 +2316,8 @@ declare namespace geoLocationManager { * @typedef ContinuousLocationRequest * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ContinuousLocationRequest { /** @@ -2187,7 +2326,8 @@ declare namespace geoLocationManager { * @type { number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interval: number; @@ -2197,7 +2337,8 @@ declare namespace geoLocationManager { * @type { UserActivityScenario | PowerConsumptionScenario } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ locationScenario: UserActivityScenario | PowerConsumptionScenario; @@ -2209,7 +2350,8 @@ declare namespace geoLocationManager { * @syscap SystemCapability.Location.Location.Core * @systemapi * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ sportsType?: SportsType; @@ -2565,7 +2707,8 @@ declare namespace geoLocationManager { * @typedef LocatingRequiredDataConfig * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface LocatingRequiredDataConfig { /** @@ -2574,7 +2717,8 @@ declare namespace geoLocationManager { * @type {LocatingRequiredDataType} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type: LocatingRequiredDataType; @@ -2584,7 +2728,8 @@ declare namespace geoLocationManager { * @type {boolean} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ needStartScan: boolean; @@ -2595,7 +2740,8 @@ declare namespace geoLocationManager { * @type {?number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ scanInterval?: number; @@ -2606,7 +2752,8 @@ declare namespace geoLocationManager { * @type {?number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ scanTimeout?: number; } @@ -2616,7 +2763,8 @@ declare namespace geoLocationManager { * @typedef LocatingRequiredData * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface LocatingRequiredData { /** @@ -2625,7 +2773,8 @@ declare namespace geoLocationManager { * @type {?WifiScanInfo} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ wifiData?: WifiScanInfo; @@ -2635,7 +2784,8 @@ declare namespace geoLocationManager { * @type {?BluetoothScanInfo} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ bluetoothData?: BluetoothScanInfo; } @@ -2645,7 +2795,8 @@ declare namespace geoLocationManager { * @typedef WifiScanInfo * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface WifiScanInfo { /** @@ -2654,7 +2805,8 @@ declare namespace geoLocationManager { * @type {string} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ssid: string; @@ -2664,7 +2816,8 @@ declare namespace geoLocationManager { * @type {string} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ bssid: string; @@ -2674,7 +2827,8 @@ declare namespace geoLocationManager { * @type {number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ rssi: number; @@ -2684,7 +2838,8 @@ declare namespace geoLocationManager { * @type {number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ frequency: number; @@ -2694,7 +2849,8 @@ declare namespace geoLocationManager { * @type {number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; } @@ -2705,7 +2861,8 @@ declare namespace geoLocationManager { * @typedef BluetoothScanInfo * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BluetoothScanInfo { /** @@ -2714,7 +2871,8 @@ declare namespace geoLocationManager { * @type {string} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deviceName: string; @@ -2724,7 +2882,8 @@ declare namespace geoLocationManager { * @type {string} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ macAddress: string; @@ -2734,7 +2893,8 @@ declare namespace geoLocationManager { * @type {number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ rssi: number; @@ -2744,7 +2904,8 @@ declare namespace geoLocationManager { * @type {number} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ timestamp: number; } @@ -2754,7 +2915,8 @@ declare namespace geoLocationManager { * * @typedef BluetoothScanResult * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ export interface BluetoothScanResult { /** @@ -2762,7 +2924,8 @@ declare namespace geoLocationManager { * * @type { string } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -2771,7 +2934,8 @@ declare namespace geoLocationManager { * * @type { number } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ rssi: number; @@ -2780,7 +2944,8 @@ declare namespace geoLocationManager { * * @type { ?ArrayBuffer } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ data?: ArrayBuffer; @@ -2789,7 +2954,8 @@ declare namespace geoLocationManager { * * @type { string } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ deviceName: string; @@ -2798,7 +2964,8 @@ declare namespace geoLocationManager { * * @type { boolean } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ connectable: boolean; } @@ -2944,6 +3111,126 @@ declare namespace geoLocationManager { timestamp: number; } + /** + * Beacon equipment manufacturer data. + * + * @typedef BeaconManufactureData + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + export interface BeaconManufactureData { + /** + * Manufacture id. + * + * @type { number } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + manufactureId: number; + + /** + * Manufacture data. + * + * @type { ArrayBuffer } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + manufactureData: ArrayBuffer; + + /** + * Manufacture data mask. + * + * @type { ArrayBuffer } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + manufactureDataMask: ArrayBuffer; + } + + /** + * Beacon fence details. + * + * @typedef BeaconFence + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + export interface BeaconFence { + /** + * Identifier of the beacon fence. + * + * @type { string } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + identifier: string; + + /** + * Beacon fence information type. + * + * @type { BeaconFenceInfoType } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + beaconFenceInfoType: BeaconFenceInfoType; + + /** + * Beacon equipment manufacture data. + * + * @type { ?BeaconManufactureData } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + manufactureData?: BeaconManufactureData; + } + + /** + * Configuring parameters in BeaconFence request. + * + * @typedef BeaconFenceRequest + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + export interface BeaconFenceRequest { + /** + * Beacon fence information. + * + * @type { BeaconFence } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + beacon: BeaconFence; + + /** + * Indicates the callback for reporting the BeaconFence transition status. + * + * @type { ?Callback } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + transitionCallback?: Callback; + + /** + * Indicates the name of FenceExtensionAbility. + * + * @type { ?string } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + fenceExtensionAbilityName?: string; + } + /** * Enum for the source of the location. * @@ -3000,14 +3287,16 @@ declare namespace geoLocationManager { * * @enum { number } * @syscap SystemCapability.Location.Location.Geofence - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum CoordinateSystemType { /** * WGS84 coordinates system. * * @syscap SystemCapability.Location.Location.Geofence - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WGS84 = 1, @@ -3015,7 +3304,8 @@ declare namespace geoLocationManager { * GCJ-02 coordinates system. * * @syscap SystemCapability.Location.Location.Geofence - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GCJ02 = 2 } @@ -3026,7 +3316,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LocationIconStatus { /** @@ -3034,7 +3325,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_NOT_STARTED = 0, @@ -3043,7 +3335,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_STARTED = 1, @@ -3052,7 +3345,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HD_LOCATING_STARTED = 2 } @@ -3063,7 +3357,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LocationError { /** @@ -3071,7 +3366,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_FAILED_DEFAULT = -1, @@ -3080,7 +3376,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_FAILED_LOCATION_PERMISSION_DENIED = -2, @@ -3089,7 +3386,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_FAILED_BACKGROUND_PERMISSION_DENIED = -3, @@ -3098,7 +3396,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_FAILED_LOCATION_SWITCH_OFF = -4, @@ -3107,7 +3406,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOCATING_FAILED_INTERNET_ACCESS_FAILURE = -5 } @@ -3150,14 +3450,16 @@ declare namespace geoLocationManager { * * @enum { number } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SatelliteConstellationCategory { /** * Invalid value. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_UNKNOWN = 0, @@ -3165,7 +3467,8 @@ declare namespace geoLocationManager { * GPS. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_GPS = 1, @@ -3173,7 +3476,8 @@ declare namespace geoLocationManager { * SBAS. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_SBAS = 2, @@ -3181,7 +3485,8 @@ declare namespace geoLocationManager { * GLONASS. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_GLONASS = 3, @@ -3189,7 +3494,8 @@ declare namespace geoLocationManager { * QZSS. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_QZSS = 4, @@ -3197,7 +3503,8 @@ declare namespace geoLocationManager { * BEIDOU. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_BEIDOU = 5, @@ -3205,7 +3512,8 @@ declare namespace geoLocationManager { * GALILEO. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_GALILEO = 6, @@ -3213,7 +3521,8 @@ declare namespace geoLocationManager { * IRNSS. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONSTELLATION_CATEGORY_IRNSS = 7 } @@ -3223,14 +3532,16 @@ declare namespace geoLocationManager { * * @enum { number } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SatelliteAdditionalInfo { /** * Default value. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATELLITES_ADDITIONAL_INFO_NULL = 0, @@ -3238,7 +3549,8 @@ declare namespace geoLocationManager { * Ephemeris data exist. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATELLITES_ADDITIONAL_INFO_EPHEMERIS_DATA_EXIST = 1, @@ -3246,7 +3558,8 @@ declare namespace geoLocationManager { * Almanac data exist. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATELLITES_ADDITIONAL_INFO_ALMANAC_DATA_EXIST = 2, @@ -3254,7 +3567,8 @@ declare namespace geoLocationManager { * This satellite is being used in location fix. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATELLITES_ADDITIONAL_INFO_USED_IN_FIX = 4, @@ -3262,7 +3576,8 @@ declare namespace geoLocationManager { * Carrier frequency exist. * * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATELLITES_ADDITIONAL_INFO_CARRIER_FREQUENCY_EXIST = 8 } @@ -3273,7 +3588,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum UserActivityScenario { /** @@ -3281,7 +3597,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION = 0x401, @@ -3290,7 +3607,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPORT = 0x402, @@ -3299,7 +3617,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSPORT = 0x403, @@ -3308,7 +3627,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DAILY_LIFE_SERVICE = 0x404 } @@ -3546,7 +3866,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum PowerConsumptionScenario { /** @@ -3554,7 +3875,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_POWER_CONSUMPTION = 0x601, @@ -3563,7 +3885,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOW_POWER_CONSUMPTION = 0x602, @@ -3572,7 +3895,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NO_POWER_CONSUMPTION = 0x603 } @@ -3583,7 +3907,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LocationPrivacyType { /** @@ -3591,7 +3916,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ OTHERS = 0, @@ -3600,7 +3926,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ STARTUP, @@ -3609,7 +3936,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ CORE_LOCATION } @@ -3620,7 +3948,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SportsType { /** @@ -3628,7 +3957,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RUNNING = 1, @@ -3637,7 +3967,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WALKING, @@ -3646,7 +3977,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CYCLING } @@ -3683,7 +4015,8 @@ declare namespace geoLocationManager { * * @typedef CountryCode * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export interface CountryCode { /** @@ -3691,7 +4024,8 @@ declare namespace geoLocationManager { * * @type { string } * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ country: string; @@ -3700,7 +4034,8 @@ declare namespace geoLocationManager { * * @type { CountryCodeType } * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ type: CountryCodeType; } @@ -3710,14 +4045,16 @@ declare namespace geoLocationManager { * * @enum { number } * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export enum CountryCodeType { /** * Country code obtained from the locale setting. * * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTRY_CODE_FROM_LOCALE = 1, @@ -3725,7 +4062,8 @@ declare namespace geoLocationManager { * Country code obtained from the SIM information. * * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTRY_CODE_FROM_SIM, @@ -3733,7 +4071,8 @@ declare namespace geoLocationManager { * Query the country code information from the reverse geocoding result. * * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTRY_CODE_FROM_LOCATION, @@ -3741,7 +4080,8 @@ declare namespace geoLocationManager { * Obtain the country code from the cell registration information. * * @syscap SystemCapability.Location.Location.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ COUNTRY_CODE_FROM_NETWORK } @@ -3752,7 +4092,8 @@ declare namespace geoLocationManager { * @enum { number } * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export enum LocatingRequiredDataType { /** @@ -3760,7 +4101,8 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ WIFI = 1, @@ -3769,10 +4111,30 @@ declare namespace geoLocationManager { * * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ BLUETOOTH } + + /** + * Enum for the beacon fence information type. + * + * @enum { number } + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + export enum BeaconFenceInfoType { + /** + * Identifies a beacon device using beacon device manufacture data. + * + * @syscap SystemCapability.Location.Location.Geofence + * @atomicservice + * @since 20 + */ + BEACON_MANUFACTURE_DATA = 1 + } } export default geoLocationManager; diff --git a/api/@ohos.graphics.colorSpaceManager.d.ts b/api/@ohos.graphics.colorSpaceManager.d.ts index 3357dfec7ac4ce0912e8a02ed73c817f45b25004..e077a8d4da8f2905762beffc1166b495702a135c 100644 --- a/api/@ohos.graphics.colorSpaceManager.d.ts +++ b/api/@ohos.graphics.colorSpaceManager.d.ts @@ -42,6 +42,7 @@ * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace colorSpaceManager { /** @@ -63,7 +64,8 @@ declare namespace colorSpaceManager { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ColorSpace { /** @@ -83,6 +85,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -103,6 +106,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ADOBE_RGB_1998 = 1, @@ -123,6 +127,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DCI_P3 = 2, @@ -143,6 +148,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_P3 = 3, @@ -163,6 +169,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SRGB = 4, @@ -180,6 +187,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT709 = 6, @@ -197,6 +205,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT601_EBU = 7, @@ -214,6 +223,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT601_SMPTE_C = 8, @@ -231,6 +241,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT2020_HLG = 9, @@ -248,6 +259,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT2020_PQ = 10, @@ -263,6 +275,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ P3_HLG = 11, @@ -278,6 +291,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ P3_PQ = 12, @@ -293,6 +307,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ADOBE_RGB_1998_LIMIT = 13, @@ -308,6 +323,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_P3_LIMIT = 14, @@ -323,6 +339,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SRGB_LIMIT = 15, @@ -338,6 +355,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT709_LIMIT = 16, @@ -353,6 +371,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT601_EBU_LIMIT = 17, @@ -368,6 +387,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT601_SMPTE_C_LIMIT = 18, @@ -383,6 +403,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT2020_HLG_LIMIT = 19, @@ -398,6 +419,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BT2020_PQ_LIMIT = 20, @@ -413,6 +435,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ P3_HLG_LIMIT = 21, @@ -428,6 +451,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ P3_PQ_LIMIT = 22, @@ -443,6 +467,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LINEAR_P3 = 23, @@ -458,6 +483,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LINEAR_SRGB = 24, @@ -473,6 +499,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LINEAR_BT709 = LINEAR_SRGB, @@ -488,6 +515,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LINEAR_BT2020 = 25, @@ -503,6 +531,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_SRGB = SRGB, @@ -518,6 +547,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_P3_SRGB = DISPLAY_P3, @@ -533,6 +563,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_P3_HLG = P3_HLG, @@ -548,6 +579,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_P3_PQ = P3_PQ, @@ -558,6 +590,13 @@ declare namespace colorSpaceManager { */ H_LOG = 26, + /** + * PRIMARIES_BT2020 | TRANSFUNC_SRGB | RANGE_FULL + * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core + * @since 20 + */ + DISPLAY_BT2020_SRGB = 27, + /** * Indicates a customized color space. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core @@ -575,6 +614,7 @@ declare namespace colorSpaceManager { * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM = 5, } @@ -593,6 +633,7 @@ declare namespace colorSpaceManager { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorSpacePrimaries { /** @@ -606,7 +647,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ redX: number; @@ -621,7 +663,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ redY: number; @@ -636,7 +679,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ greenX: number; @@ -651,7 +695,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ greenY: number; @@ -666,7 +711,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blueX: number; @@ -681,7 +727,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blueY: number; @@ -696,7 +743,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ whitePointX: number; @@ -711,7 +759,8 @@ declare namespace colorSpaceManager { * @type { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ whitePointY: number; } @@ -728,6 +777,7 @@ declare namespace colorSpaceManager { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorSpaceManager { /** @@ -744,40 +794,47 @@ declare namespace colorSpaceManager { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getColorSpaceName(): ColorSpace; /** * Get white point(x, y) of color space. * @returns { Array } Returns the white point value of color space. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Get white point(x, y) of color space. * @returns { Array } Returns the white point value of color space. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getWhitePoint(): Array; /** * Get gamma value of color space. * @returns { number } Returns the gamma value of color space. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Get gamma value of color space. * @returns { number } Returns the gamma value of color space. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getGamma(): number; } @@ -802,6 +859,7 @@ declare namespace colorSpaceManager { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function create(colorSpaceName: ColorSpace): ColorSpaceManager; @@ -812,7 +870,8 @@ declare namespace colorSpaceManager { * @returns { ColorSpaceManager } Returns a color space manager object created by customized parameters. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Incorrect parameter type. * 2.Parameter verification failed. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ @@ -823,10 +882,12 @@ declare namespace colorSpaceManager { * @returns { ColorSpaceManager } Returns a color space manager object created by customized parameters. * @throws { BusinessError } 401 - Parameter error. Possible cause: 1.Incorrect parameter type. * 2.Parameter verification failed. - * @throws { BusinessError } 18600001 - The parameter value is abnormal. + * @throws { BusinessError } 18600001 - Invalid parameter value. Possible cause: Used UNKNOWN or CUSTOM + * color space type enum values to directly create a colorSpaceManager object. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function create(primaries: ColorSpacePrimaries, gamma: number): ColorSpaceManager; } diff --git a/api/@ohos.graphics.common2D.d.ts b/api/@ohos.graphics.common2D.d.ts index ea035d27bd19322de502af069eb0554ac12a710a..5519e83ffa9945465121e343c6c5dc977e319046 100644 --- a/api/@ohos.graphics.common2D.d.ts +++ b/api/@ohos.graphics.common2D.d.ts @@ -24,6 +24,15 @@ * @syscap SystemCapability.Graphics.Drawing * @since 11 */ +/** + * The date structure that provides the basis for graphics. + * + * @namespace common2D + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ declare namespace common2D { /** * Describes a color in ARGB format. @@ -31,6 +40,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes a color in ARGB format. + * @typedef Color + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ interface Color { /** * Alpha component of the color. The value is an integer ranging from 0 to 255. @@ -38,6 +55,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Alpha component of the color. The value is an integer ranging from 0 to 255. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ alpha: number; /** * Red component of the color. The value is an integer ranging from 0 to 255. @@ -45,6 +70,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Red component of the color. The value is an integer ranging from 0 to 255. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ red: number; /** * Green component of the color. The value is an integer ranging from 0 to 255. @@ -52,6 +85,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Green component of the color. The value is an integer ranging from 0 to 255. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ green: number; /** * Blue component of the color. The value is an integer ranging from 0 to 255. @@ -59,6 +100,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Blue component of the color. The value is an integer ranging from 0 to 255. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ blue: number; } @@ -68,6 +117,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes a rectangle, which can be defined by two coordinate points: upper left corner point and lower right corner point. + * @typedef Rect + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ interface Rect { /** * X coordinate of the upper left corner of the rectangle. The value is a floating point number. @@ -75,6 +132,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * X coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ left: number; /** * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. @@ -82,6 +147,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ top: number; /** * X coordinate of the lower right corner of the rectangle. The value is a floating point number. @@ -89,6 +162,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * X coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ right: number; /** * Y coordinate of the lower right corner of the rectangle. The value is a floating point number. @@ -96,6 +177,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Y coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ bottom: number; } @@ -105,6 +194,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Describes a coordinate point. + * @typedef Point + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ interface Point { /** * Horizontal coordinate. The value is a floating point number. @@ -112,6 +209,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Horizontal coordinate. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ x: number; /** @@ -120,6 +225,14 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Vertical coordinate. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ y: number; } @@ -131,6 +244,15 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Describes a 3D coordinate point. + * + * @typedef Point3d + * @extends Point + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ interface Point3d extends Point { /** * Z-axis coordinate. The value is a floating point number. @@ -138,6 +260,13 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Z-axis coordinate. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ z: number; } @@ -147,6 +276,7 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ interface Color4f { /** @@ -155,6 +285,7 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ alpha: number; /** @@ -163,6 +294,7 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ red: number; /** @@ -171,6 +303,7 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ green: number; /** @@ -179,6 +312,7 @@ declare namespace common2D { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ blue: number; } diff --git a/api/@ohos.graphics.displaySync.d.ts b/api/@ohos.graphics.displaySync.d.ts index 64492f0336280453755cfa140c410a7d45eb7a0f..5f6b7c780b9c1a1bddc8c9a2ce44a6f9a18f231b 100644 --- a/api/@ohos.graphics.displaySync.d.ts +++ b/api/@ohos.graphics.displaySync.d.ts @@ -19,37 +19,44 @@ */ import type { Callback } from './@ohos.base'; +/*** if arkts 1.2 */ +import { ExpectedFrameRateRange } from './arkui/component/common'; +/*** endif */ /** * Provides functions of applying an independent draw frame rate used for drawing the UI. * * @namespace displaySync * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ declare namespace displaySync { /** * Provides the IntervalInfo interface, which includes timestamp and targetTimestamp. * @interface IntervalInfo * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ interface IntervalInfo { /** * The timestamp means the current drawing frame time. - * @type { number } + * @type { long } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; /** * The timestamp means the next drawing frame time. - * @type { number } + * @type { long } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ - targetTimestamp: number; + targetTimestamp: long; } /** @@ -57,7 +64,8 @@ declare namespace displaySync { * the frequency of triggering callback function. * @interface DisplaySync * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ interface DisplaySync { /** @@ -71,7 +79,8 @@ declare namespace displaySync { *
3. Parameter verification failed. * or check ExpectedFrameRateRange if valid. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange) : void; @@ -81,7 +90,8 @@ declare namespace displaySync { * @param { 'frame' } type - The type of event to remove the listener for. Must be 'frame'. * @param { Callback } callback - The callback function to be called when DisplaySync dispatching. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ on(type: 'frame', callback: Callback): void; @@ -92,7 +102,8 @@ declare namespace displaySync { * @param { Callback } [callback] - The callback function to remove. If not provided, all callbacks for the given event type * will be removed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ off(type: 'frame', callback?: Callback): void; @@ -100,7 +111,8 @@ declare namespace displaySync { * Add DisplaySync to Pipeline. It means that * the callback function be enabled. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ start(): void; @@ -108,7 +120,8 @@ declare namespace displaySync { * Delete DisplaySync from Pipeline. It means that * the callback function be disabled. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ stop(): void; } @@ -117,7 +130,8 @@ declare namespace displaySync { * Create a new DisplaySync object. * @returns { DisplaySync } DisplaySync * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 + * @since arkts {'1.1': '11', '1.2': '20'} + * @arkts 1.1&1.2 */ function create(): DisplaySync; } diff --git a/api/@ohos.graphics.drawing.d.ts b/api/@ohos.graphics.drawing.d.ts index 01ab26aafa2ab71f291ab0998ee70e59d3c7f851..c572d79a26f30fb3902b69536adad30f6708ef54 100644 --- a/api/@ohos.graphics.drawing.d.ts +++ b/api/@ohos.graphics.drawing.d.ts @@ -30,6 +30,15 @@ import { Resource } from './global/resource'; * @syscap SystemCapability.Graphics.Drawing * @since 11 */ +/** + * The common2D module defines some common data types in the 2D graphics field. + * + * @namespace drawing + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ declare namespace drawing { /** * Enumerates the blend modes. A blend mode combines two colors (source color and destination color) in a specific way to create a new color. @@ -54,90 +63,212 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enumerates the blend modes. A blend mode combines two colors (source color and destination color) in a specific way to create a new color. + * This is commonly used in graphics operations like overlaying, filtering, and masking. + * The blending process applies the same logic to the red, green, and blue color channels separately. + * The alpha channel, however, is handled according to the specific definitions of each blend mode. + * + * For brevity, the following abbreviations are used: + * + * s: source. + * d: destination. + * sa: source alpha. + * da: destination alpha. + * The following abbreviations are used in the calculation result: + * + * r: used when the calculation method is the same for the four channels (alpha, red, green, and blue channels). + * ra: used when only the alpha channel is manipulated. + * rc: used when the other three color channels are manipulated. + * The table below shows the effect of each blend mode, where the yellow rectangle is the source and the blue circle is the destination. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum BlendMode { /** * r = 0, sets the the destination pixels to fully transparent. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = 0, sets the the destination pixels to fully transparent. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ CLEAR = 0, /** * r = s (all channels of the result equal those of the source), replaces the destination pixels with the source pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s (all channels of the result equal those of the source), replaces the destination pixels with the source pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SRC = 1, /** * r = d (all channels of the result equal those of the destination), keeps the destination pixels unchanged. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = d (all channels of the result equal those of the destination), keeps the destination pixels unchanged. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DST = 2, /** * r = s + (1 - sa) * d, draws the source pixels over the destination pixels, considering the source's transparency. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s + (1 - sa) * d, draws the source pixels over the destination pixels, considering the source's transparency. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SRC_OVER = 3, /** * r = d + (1 - da) * s, draws the destination pixels over the source pixels, considering the destination's transparency. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = d + (1 - da) * s, draws the destination pixels over the source pixels, considering the destination's transparency. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DST_OVER = 4, /** * r = s * da, retains only the intersection of the source pixels with the opaque parts of the destination. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * da, retains only the intersection of the source pixels with the opaque parts of the destination. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SRC_IN = 5, /** * r = d * sa, retains only the intersection of the destination pixels with the opaque parts of the source. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = d * sa, retains only the intersection of the destination pixels with the opaque parts of the source. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DST_IN = 6, /** * r = s * (1 - da), retains the parts of the source pixels that do not overlap with the destination. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * (1 - da), retains the parts of the source pixels that do not overlap with the destination. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SRC_OUT = 7, /** * r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DST_OUT = 8, /** * r = s * da + d * (1 - sa), covers the destination pixels with the source pixels, showing the source only in the opaque parts of the destination. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * da + d * (1 - sa), covers the destination pixels with the source pixels, showing the source only in the opaque parts of the destination. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SRC_ATOP = 9, /** * r = d * sa + s * (1 - da), covers the source pixels with the destination pixels, showing the destination only in the opaque parts of the source. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = d * sa + s * (1 - da), covers the source pixels with the destination pixels, showing the destination only in the opaque parts of the source. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DST_ATOP = 10, /** * r = s * (1 - da) + d * (1 - sa), shows only the non-overlapping parts of the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * (1 - da) + d * (1 - sa), shows only the non-overlapping parts of the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ XOR = 11, /** * r = min(s + d, 1), adds the color values of the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = min(s + d, 1), adds the color values of the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ PLUS = 12, /** * r = s * d, multiplies the color values of the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * d, multiplies the color values of the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ MODULATE = 13, /** * r = s + d - s * d, inverts the color values of the source and destination pixels, multiplies them, @@ -145,90 +276,196 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s + d - s * d, inverts the color values of the source and destination pixels, multiplies them, + * and then inverts the result, typically producing a brighter outcome. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SCREEN = 14, /** * Selectively applies MULTIPLY or SCREEN based on the brightness of the destination pixels, enhancing contrast. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Selectively applies MULTIPLY or SCREEN based on the brightness of the destination pixels, enhancing contrast. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ OVERLAY = 15, /** * rc = s + d - max(s * da, d * sa), ra = s + (1 - sa) * d, takes the darker color values between the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * rc = s + d - max(s * da, d * sa), ra = s + (1 - sa) * d, takes the darker color values between the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DARKEN = 16, /** * rc = s + d - min(s * da, d * sa), ra = s + (1 - sa) * d, takes the lighter color values between the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * rc = s + d - min(s * da, d * sa), ra = s + (1 - sa) * d, takes the lighter color values between the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ LIGHTEN = 17, /** * Brightens the destination pixels by reducing contrast to reflect the source pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Brightens the destination pixels by reducing contrast to reflect the source pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ COLOR_DODGE = 18, /** * Darkens the destination pixels by increasing contrast to reflect the source pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Darkens the destination pixels by increasing contrast to reflect the source pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ COLOR_BURN = 19, /** * Selectively applies MULTIPLY or SCREEN based on the brightness of the source pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Selectively applies MULTIPLY or SCREEN based on the brightness of the source pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ HARD_LIGHT = 20, /** * Softly brightens or darkens the destination pixels based on the brightness of the source pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Softly brightens or darkens the destination pixels based on the brightness of the source pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SOFT_LIGHT = 21, /** * rc = s + d - 2 * (min(s * da, d * sa)), ra = s + (1 - sa) * d, calculates the difference between the color values of the source and destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * rc = s + d - 2 * (min(s * da, d * sa)), ra = s + (1 - sa) * d, calculates the difference between the color values of the source and destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DIFFERENCE = 22, /** * rc = s + d - two(s * d), ra = s + (1 - sa) * d, similar to DIFFERENCE but with lower contrast. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * rc = s + d - two(s * d), ra = s + (1 - sa) * d, similar to DIFFERENCE but with lower contrast. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ EXCLUSION = 23, /** * r = s * (1 - da) + d * (1 - sa) + s * d, multiplies the color values of the source and destination pixels, typically resulting in a darker outcome. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * r = s * (1 - da) + d * (1 - sa) + s * d, multiplies the color values of the source and destination pixels, typically resulting in a darker outcome. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ MULTIPLY = 24, /** * Uses the hue of the source pixels and the saturation and brightness of the destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Uses the hue of the source pixels and the saturation and brightness of the destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ HUE = 25, /** * Uses the saturation of the source pixels and the hue and brightness of the destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Uses the saturation of the source pixels and the hue and brightness of the destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ SATURATION = 26, /** * Uses the hue and saturation of the source pixels and the brightness of the destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Uses the hue and saturation of the source pixels and the brightness of the destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ COLOR = 27, /** * Uses the brightness of the source pixels and the hue and saturation of the destination pixels. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Uses the brightness of the source pixels and the hue and saturation of the destination pixels. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ LUMINOSITY = 28, } @@ -238,12 +475,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the directions of a closed contour. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PathDirection { /** * Adds a closed contour clockwise. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a closed contour clockwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CLOCKWISE = 0, /** @@ -251,6 +501,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a closed contour counterclockwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ COUNTER_CLOCKWISE = 1, } @@ -260,6 +516,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the fill types of a path. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PathFillType { /** * Specifies that "inside" is computed by a non-zero sum of signed edge crossings. Specifically, draws a point and emits a ray in any direction. @@ -270,6 +533,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Specifies that "inside" is computed by a non-zero sum of signed edge crossings. Specifically, draws a point and emits a ray in any direction. + * A count is used to record the number of intersection points of the ray and path, and the initial count is 0. + * When encountering a clockwise intersection point (the path passes from the left to the right of the ray), the count increases by 1. + * When encountering a counterclockwise intersection point (the path passes from the right to the left of the ray), the count decreases by 1. + * If the final count is not 0, the point is inside the path and needs to be colored. If the final count is 0, the point is not colored. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ WINDING = 0, /** @@ -279,6 +552,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Specifies that "inside" is computed by an odd number of edge crossings. Specifically, draws a point and emits a ray in any direction. + * If the number of intersection points of the ray and path is an odd number, the point is considered to be inside the path and needs to be colored. + * If the number is an even number, the point is not colored. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ EVEN_ODD = 1, /** @@ -286,6 +567,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Same as WINDING, but draws outside of the path, rather than inside. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ INVERSE_WINDING = 2, /** @@ -293,6 +580,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Same as EVEN_ODD, but draws outside of the path, rather than inside. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ INVERSE_EVEN_ODD = 3, } @@ -303,24 +596,50 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the dimensions of matrix information in path measurement. + * It is often used in animation scenarios where objects move along a path. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PathMeasureMatrixFlags { /** * Matrix corresponding to the position information. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Matrix corresponding to the position information. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ GET_POSITION_MATRIX = 0, /** * Matrix corresponding to the tangent information. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Matrix corresponding to the tangent information. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ GET_TANGENT_MATRIX = 1, /** * Matrix corresponding to the position and tangent information. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Matrix corresponding to the position and tangent information. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ GET_POSITION_AND_TANGENT_MATRIX = 2, } @@ -330,6 +649,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a rounded rectangle. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class RoundRect { /** @@ -338,6 +665,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(roundRect: RoundRect); @@ -352,6 +680,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * A constructor used to create a RoundRect object. A rounded rectangle is created when both xRadii and yRadii are greater than 0. + * Otherwise, only a rectangle is created. + * @param { common2D.Rect } rect - Rectangle that encloses the rounded rectangle to create. + * @param { number } xRadii - Radius of the rounded corner on the X axis. The value is a floating point number. A negative number is invalid. + * @param { number } yRadii - Radius of the rounded corner on the Y axis. The value is a floating point number. A negative number is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(rect: common2D.Rect, xRadii: number, yRadii: number); /** @@ -364,6 +705,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the radii of the specified rounded corner in this rounded rectangle. + * @param { CornerPos } pos - Position of the rounded corner. + * @param { number } x - Radius of the rounded corner on the X axis. The value is a floating point number. A negative number is invalid. + * @param { number } y - Radius of the rounded corner on the Y axis. The value is a floating point number. A negative number is invalid. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setCorner(pos: CornerPos, x: number, y: number): void; /** @@ -376,6 +728,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the radii of the specified rounded corner in this rounded rectangle. + * @param { CornerPos } pos - Position of the rounded corner. + * @returns { common2D.Point } Point. The horizontal coordinate indicates the radius of the rounded corner on the X axis, + * and the vertical coordinate indicates the radius on the Y axis. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getCorner(pos: CornerPos): common2D.Point; /** @@ -389,6 +752,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Translates this rounded rectangle by an offset along the X axis and Y axis. + * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis, + * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number. + * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis, + * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ offset(dx: number, dy: number): void; } @@ -398,12 +773,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the path operation types. It is often used in path combination and clipping scenarios. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum PathOp { /** * Difference operation. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Difference operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DIFFERENCE = 0, /** @@ -411,6 +801,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Intersection operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ INTERSECT = 1, /** @@ -418,6 +815,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Union operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ UNION = 2, /** @@ -425,6 +829,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * XOR operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ XOR = 3, /** @@ -432,6 +843,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Reverse difference operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ REVERSE_DIFFERENCE = 4, } @@ -441,12 +859,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Enumerates the path operation types contained in an iterator. It is used to read path operation instructions. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PathIteratorVerb { /** * Sets the start point. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Sets the start point. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ MOVE = 0, /** @@ -454,6 +885,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Adds a line segment. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ LINE = 1, /** @@ -461,6 +898,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Adds a quadratic Bezier curve for smooth transitions. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ QUAD = 2, /** @@ -468,6 +911,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Adds a conic curve. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CONIC = 3, /** @@ -475,6 +924,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Adds a cubic Bezier curve for smooth transitions. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CUBIC = 4, /** @@ -482,6 +937,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Closes a path. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CLOSE = 5, /** @@ -489,6 +950,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * The path setting is complete. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ DONE = CLOSE + 1, } @@ -498,6 +965,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Implements a path operation iterator. You can read path operation instructions by traversing the iterator. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class PathIterator { /** * Creates an iterator and binds it with a path. @@ -505,6 +980,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates an iterator and binds it with a path. + * @param { Path } path - Path object bound to the iterator. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(path: Path); /** @@ -517,6 +1000,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Retrieves the next operation in this path and moves the iterator to that operation. + * @param { Array } points - Indicates the point array. + * @param { number } offset - Indicates the offset into the array where entries should be placed. The default value is 0. + * @returns { PathIteratorVerb } Returns the next verb in this iterator's path. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ next(points: Array, offset?: number): PathIteratorVerb; /** @@ -525,6 +1019,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Retrieves the next operation in this path, without moving the iterator. + * @returns { PathIteratorVerb } Returns the next verb in the iteration. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ peek(): PathIteratorVerb; /** @@ -533,6 +1034,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Checks whether there is a next operation in the path operation iterator. + * @returns { boolean } Returns true if there are more elements to be iterated through, false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ hasNext(): boolean; } @@ -542,12 +1050,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * A compound geometric path consisting of line segments, arcs, quadratic Bezier curves, and cubic Bezier curves. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Path { /** * Constructs a path. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Constructs a path. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(); /** @@ -556,6 +1079,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Constructs a copy of an existing path. + * @param { Path } path - Path to copy. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(path: Path); /** @@ -576,6 +1107,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets the start point of this path. + * @param { number } x - X coordinate of the start point. The value is a floating point number. + * @param { number } y - Y coordinate of the start point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ moveTo(x: number, y: number): void; /** @@ -587,6 +1128,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a line segment from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. + * @param { number } x - X coordinate of the target point. The value is a floating point number. + * @param { number } y - Y coordinate of the target point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ lineTo(x: number, y: number): void; /** @@ -605,21 +1156,51 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - arcTo(x1: number, y1: number, x2: number, y2: number, startDeg: number, sweepDeg: number): void; - /** - * Draws a quadratic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. - * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number. - * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number. - * @param { number } endX - X coordinate of the target point. The value is a floating point number. - * @param { number } endY - Y coordinate of the target point. The value is a floating point number. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. - * @syscap SystemCapability.Graphics.Drawing - * @since 11 - */ - quadTo(ctrlX: number, ctrlY: number, endX: number, endY: number): void; - + * Draws an arc to this path using angle arc mode. This mode first defines a rectangle and takes its inscribed ellipse. + * Then, it specifies a start angle and a sweep angle. The arc is the portion of the ellipse's circumference defined by the start angle + * and the sweep angle. By default, a line segment from the last point of the path to the start point of the arc is also added. + * @param { number } x1 - X coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @param { number } y1 - Y coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @param { number } x2 - X coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @param { number } y2 - Y coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @param { number } startDeg - Start angle. The start direction (0°) of the angle is the positive direction of the X axis. + * @param { number } sweepDeg - Angle to sweep, in degrees. A positive number indicates a clockwise sweep, + * and a negative value indicates a counterclockwise swipe. The actual swipe degree is the modulo operation result of the input parameter by 360. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + arcTo(x1: number, y1: number, x2: number, y2: number, startDeg: number, sweepDeg: number): void; + + /** + * Draws a quadratic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { number } endX - X coordinate of the target point. The value is a floating point number. + * @param { number } endY - Y coordinate of the target point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 11 + */ + /** + * Draws a quadratic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { number } endX - X coordinate of the target point. The value is a floating point number. + * @param { number } endY - Y coordinate of the target point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + quadTo(ctrlX: number, ctrlY: number, endX: number, endY: number): void; + /** * Draws a conic curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number. @@ -634,6 +1215,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a conic curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { number } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { number } endX - X coordinate of the target point. The value is a floating point number. + * @param { number } endY - Y coordinate of the target point. The value is a floating point number. + * @param { number } weight - Weight of the curve, which determines its shape. The larger the value, + * the closer of the curve to the control point. If the value is less than or equal to 0, + * this API has the same effect as lineTo. If the value is 1, it has the same effect as quadTo. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ conicTo(ctrlX: number, ctrlY: number, endX: number, endY: number, weight: number): void; /** @@ -649,6 +1245,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a cubic Bezier curve from the last point of this path to the target point. If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX1 - X coordinate of the first control point. The value is a floating point number. + * @param { number } ctrlY1 - Y coordinate of the first control point. The value is a floating point number. + * @param { number } ctrlX2 - X coordinate of the second control point. The value is a floating point number. + * @param { number } ctrlY2 - Y coordinate of the second control point. The value is a floating point number. + * @param { number } endX - X coordinate of the target point. The value is a floating point number. + * @param { number } endY - Y coordinate of the target point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ cubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void; /** @@ -662,6 +1272,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the start position relative to the last point of this path. If the path is empty, the start point (0, 0) is used. + * @param { number } dx - X offset of the start point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } dy - Y offset of the start point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ rMoveTo(dx: number, dy: number): void; /** @@ -675,6 +1297,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a line segment from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. + * @param { number } dx - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } dy - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ rLineTo(dx: number, dy: number): void; /** @@ -693,6 +1327,23 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a quadratic Bezier curve from the last point of this path to a point relative to the last point. + * If the path is empty, the start point (0, 0) is used. + * @param { number } dx1 - X offset of the control point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } dy1 - Y offset of the control point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @param { number } dx2 - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } dy2 - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ rQuadTo(dx1: number, dy1: number, dx2: number, dy2: number): void; /** @@ -713,6 +1364,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a conic curve from the last point of this path to a point relative to the last point. If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX - X offset of the control point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } ctrlY - Y offset of the control point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @param { number } endX - X offset of the target point relative to the last point. A positive number indicates a rightward shift from the last point, + * and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } endY - Y offset of the target point relative to the last point. A positive number indicates an upward shift from the last point, + * and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @param { number } weight - Weight of the curve, which determines its shape. The larger the value, the closer of the curve to the control point. + * If the value is less than or equal to 0, this API is equivalent to rLineTo, that is, adding a line segment from the last point of the path + * to the target point. If the value is 1, this API is equivalent to rQuadTo. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ rConicTo(ctrlX: number, ctrlY: number, endX: number, endY: number, weight: number): void; /** @@ -735,6 +1405,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a cubic Bezier curve from the last point of this path to a point relative to the last point. + * If the path is empty, the start point (0, 0) is used. + * @param { number } ctrlX1 - X offset of the first control point relative to the last point. A positive number indicates a rightward shift + * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } ctrlY1 - Y offset of the first control point relative to the last point. A positive number indicates an upward shift + * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @param { number } ctrlX2 - X offset of the second control point relative to the last point. A positive number indicates a rightward shift + * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } ctrlY2 - Y offset of the second control point relative to the last point. A positive number indicates an upward shift + * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @param { number } endX - X offset of the target point relative to the last point. A positive number indicates a rightward shift + * from the last point, and a negative number indicates a leftward shift from the last point. The value is a floating point number. + * @param { number } endY - Y offset of the target point relative to the last point. A positive number indicates an upward shift + * from the last point, and a negative number indicates a downward shift from the last point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ rCubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void; /** @@ -747,6 +1438,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a polygon to this path. + * @param { Array } points - Array that holds the vertex coordinates of the polygon. + * @param { boolean } close - Whether to close the path, that is, whether to add a line segment from the start point + * to the end point of the path. The value true means to close the path, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addPolygon(points: Array, close: boolean): void; /** @@ -760,6 +1462,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Combines this path with the passed-in path based on the specified operation mode. + * @param { Path } path - Path object, which will be combined with the current path. + * @param { PathOp } pathOp - Operation mode. + * @returns { boolean } boolean - Result of the path combination result. The value true means that the path combination is successful, + * and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ op(path: Path, pathOp: PathOp): boolean; /** @@ -781,6 +1495,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds an arc to this path. + * + * When startAngle and sweepAngle meet the following conditions, an oval instead of an arc is added: + * + * The result of startAngle modulo 90 is close to 0. + * The value of sweepAngle is not in the range of (-360, 360). + * + * In other cases, this API adds an arc by applying the result of sweepAngle modulo 360 to the path. + * @param { common2D.Rect } rect - Rectangular boundary that encapsulates the oval including the arc. + * @param { number } startAngle - Start angle of the arc, in degrees. The value 0 indicates the positive direction of the X axis. + * The value is a floating point number. + * @param { number } sweepAngle - Angle to sweep, in degrees. A positive number indicates a clockwise sweep, + * and a negative number indicates a counterclockwise sweep. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addArc(rect: common2D.Rect, startAngle: number, sweepAngle: number): void; /** @@ -795,6 +1529,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a circle to this path in the specified direction. The start point of the circle is (x + radius, y). + * @param { number } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { number } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { number } radius - Radius of the circle. The value is a floating point number. + * If the value is less than or equal to 0, there is no effect. + * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addCircle(x: number, y: number, radius: number, pathDirection?: PathDirection): void; /** @@ -808,6 +1555,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds the inscribed ellipse of a rectangle to this path in the specified direction. + * @param { common2D.Rect } rect - Rectangular boundary of the oval. + * @param { number } start - Start point of the oval, where 0, 1, 2, and 3 correspond to the upper, right, lower, and left points, respectively. + * The value is an integer greater than or equal to 0. If the value is greater than or equal to 4, the remainder of 4 is used. + * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addOval(rect: common2D.Rect, start: number, pathDirection?: PathDirection): void; /** @@ -819,6 +1578,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a rectangle to this path in the specified direction. The start point is the upper left corner of the rectangle. + * @param { common2D.Rect } rect - Rectangle. + * @param { PathDirection } pathDirection - Direction of the path. The default direction is clockwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addRect(rect: common2D.Rect, pathDirection?: PathDirection): void; /** @@ -833,6 +1602,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a rounded rectangle to this path in the specified direction. When the path direction is clockwise, + * the start point is at the intersection of the rounded rectangle's left boundary and its lower left corner. + * When the path direction is counterclockwise, the start point is at the intersection point + * between the left boundary and the upper left corner. + * @param { RoundRect } roundRect - Rounded rectangle. + * @param { PathDirection } pathDirection - The default value is CLOCKWISE. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addRoundRect(roundRect: RoundRect, pathDirection?: PathDirection): void; /** @@ -844,6 +1626,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Transforms the points in a path by a matrix and stores the resulting path in the current Path object. + * @param { Path } path - Source Path object. + * @param { Matrix | null } matrix - Matrix object. The default value is an identity matrix. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ addPath(path: Path, matrix?: Matrix | null): void; /** @@ -854,6 +1646,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Transforms the points in this path by a matrix. + * @param { Matrix } matrix - Matrix object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ transform(matrix: Matrix): void; /** @@ -866,6 +1667,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether a coordinate point is included in this path. For details, see PathFillType. + * @param { number } x - X coordinate. The value is a floating point number. + * @param { number } y - Y coordinate. The value is a floating point number. + * @returns { boolean } Check result. The value true means that the coordinate point is included in the path, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ contains(x: number, y: number): boolean; /** @@ -888,6 +1700,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the fill type of this path. The fill type determines how "inside" of the path is drawn. + * For example, when the fill type Winding is used, "inside" of the path is determined by a non-zero sum of signed edge crossings. + * When EvenOdd is used, "inside" of the path is determined by an odd number of edge crossings. + * @param { PathFillType } pathFillType - Fill type of the path. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setFillType(pathFillType: PathFillType): void; /** @@ -905,6 +1728,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the minimum bounding rectangle that encloses this path. + * @returns { common2D.Rect } Rect object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getBounds(): common2D.Rect; /** @@ -912,6 +1742,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Closes this path by adding a line segment from the start point to the last point of the path. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ close(): void; /** @@ -926,6 +1762,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Offsets this path by specified distances along the X axis and Y axis and stores the resulting path in the Path object returned. + * @param { number } dx - X offset. A positive number indicates an offset towards the positive direction of the X axis, + * and a negative number indicates an offset towards the negative direction of the X axis. The value is a floating point number. + * @param { number } dy - Y offset. A positive number indicates an offset towards the positive direction of the Y axis, + * and a negative number indicates an offset towards the negative direction of the Y axis. The value is a floating point number. + * @returns { Path } New path generated. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ offset(dx: number, dy: number): Path; /** @@ -933,11 +1782,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Resets the path data. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ reset(): void; /** * Clears any lines and curves from the path but keeps the internal storage for faster reuse. * @syscap SystemCapability.Graphics.Drawing + * @crossplatform * @since 20 */ rewind(): void; @@ -947,6 +1804,7 @@ declare namespace drawing { * * @returns { boolean } Returns true if the path is empty; returns false otherwise. * @syscap SystemCapability.Graphics.Drawing + * @crossplatform * @since 20 */ isEmpty(): boolean; @@ -957,6 +1815,7 @@ declare namespace drawing { * @param { common2D.Rect | null } rect - Indicates the Rect object. * @returns { boolean } Returns true if the path represents a rectangle; returns false otherwise. * @syscap SystemCapability.Graphics.Drawing + * @crossplatform * @since 20 */ isRect(rect: common2D.Rect | null): boolean; @@ -970,6 +1829,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the path length. + * @param { boolean } forceClosed - Whether the path is measured as a closed path. + * The value true means that the path is considered closed during measurement, + * and false means that the path is measured based on the actual closed status. + * @returns { number } Return path length. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getLength(forceClosed: boolean): number; /** @@ -990,6 +1859,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the coordinates and tangent at a distance from the start point of this path. + * + * @param { boolean } forceClosed - Whether the path is measured as a closed path. + * The value true means that the path is considered closed during measurement, + * and false means that the path is measured based on the actual closed status. + * @param { number } distance - Distance from the start point. If a negative number is passed in, the value 0 is used. + * If a value greater than the path length is passed in, the path length is used. The value is a floating point number. + * @param { common2D.Point } position - Coordinates obtained. + * @param { common2D.Point } tangent - Tangent obtained, where tangent.x and tangent.y represent the cosine + * and sine of the tangent of the point, respectively. + * @returns { boolean } - Check result. The value true means that they are obtained, and false means the opposite. + * The values of position and tangent are not changed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getPositionAndTangent(forceClosed: boolean, distance: number, position: common2D.Point, tangent: common2D.Point): boolean; /** @@ -1008,6 +1896,23 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Extracts a segment of this path and appends it to a destination path. + * + * @param { boolean } forceClosed - Whether the path is measured as a closed path. The value true means that the path is considered closed + * during measurement, and false means that the path is measured based on the actual closed status. + * @param { number } start - Distance from the start point of the path to the start point of the segment. If it is less than 0, it defaults to 0. + * If it is greater than or equal to stop, the extraction fails. The value is a floating point number. + * @param { number } stop - Distance from the start point of the path to the end point of the segment. If it is less than or equal to start, + * the extraction fails. If it is greater than the path length, it defaults to the path length. The value is a floating point number. + * @param { boolean } startWithMoveTo - Whether to execute moveto in the destination path to move to its start point. + * The value true means to move to the start point, and false means the opposite. + * @param { Path } dst - Destination path. If the extraction succeeds, the segment is appended to the path. If the extraction fails, nothing changes. + * @returns { boolean } - Extraction result. The value **true** means that the extraction is successful, and **false** means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getSegment(forceClosed: boolean, start: number, stop: number, startWithMoveTo: boolean, dst: Path): boolean; /** @@ -1017,6 +1922,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether a path is closed. + * + * @returns { boolean } - Check result. The value true means that the path is closed, and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isClosed(): boolean; /** @@ -1034,6 +1947,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains a transformation matrix at a specific position along the path, which represents the coordinates and orientation of that point. + * + * @param { boolean } forceClosed - Whether the path is measured as a closed path. The value true means that the path is considered closed + * during measurement, and false means that the path is measured based on the actual closed status. + * @param { number } distance - Distance from the start point. If a negative number is passed in, the value 0 is used. + * If a value greater than the path length is passed in, the path length is used. The value is a floating point number. + * @param { Matrix } matrix - Matrix object used to store the matrix obtained. + * @param { PathMeasureMatrixFlags } flags - Type of the matrix information obtained. + * @returns { boolean } - Result indicating whether the transformation matrix is obtained. + * The value true means that the operation is successful, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getMatrix(forceClosed: boolean, distance: number, matrix: Matrix, flags: PathMeasureMatrixFlags): boolean; /** @@ -1045,6 +1974,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Parses the path represented by an SVG string. + * + * @param { string } str - String in SVG format, which is used to describe the path. + * @returns { boolean } Result of the parsing operation. The value true means that the operation is successful, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ buildFromSvgString(str: string): boolean; /** @@ -1054,6 +1993,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the operation iterator of this path. + * + * @returns { PathIterator } Indicates the pointer to an pathIterator object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getPathIterator(): PathIterator; /** @@ -1109,12 +2056,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the modes for drawing multiple points in an array. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PointMode { /** * Draws each point separately. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws each point separately. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ POINTS = 0, /** @@ -1122,6 +2082,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws every two points as a line segment. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ LINES = 1, /** @@ -1129,6 +2095,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws the array of points as a open polygon. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ POLYGON = 2, } @@ -1138,12 +2110,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the filter modes. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum FilterMode { /** * Nearest filter mode. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Nearest filter mode. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ FILTER_MODE_NEAREST = 0, /** @@ -1151,6 +2138,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Linear filter mode. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ FILTER_MODE_LINEAR = 1, } @@ -1160,12 +2154,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the shadow drawing behaviors. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum ShadowFlag { /** * None of the flags are enabled. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * None of the flags are enabled. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ NONE = 0, /** @@ -1173,6 +2180,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The occluder is transparent. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TRANSPARENT_OCCLUDER = 1, /** @@ -1180,6 +2193,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Only the geometric shadow effect is used. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ GEOMETRIC_ONLY = 2, /** @@ -1187,6 +2206,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * All the flags are enabled. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ALL = 3, } @@ -1195,12 +2220,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements sampling options. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class SamplingOptions { /** * Creates a SamplingOptions object. The default value of FilterMode is FILTER_MODE_NEAREST. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a SamplingOptions object. The default value of FilterMode is FILTER_MODE_NEAREST. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(); /** * Creates a SamplingOptions object. @@ -1210,14 +2249,57 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a SamplingOptions object. + * @param { FilterMode } filterMode - Storage filter mode. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(filterMode: FilterMode); } + /** + * Describes font feature for drawing and measuring single character. + * @typedef FontFeature + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + interface FontFeature { + /** + * The name of font feature. + * @type { string } feature name + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + name: string; + /** + * The value of font feature. + * @type { number } feature value + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + value: number; + } + /** * A carrier that carries the drawn content and drawing status. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * A carrier that carries the drawn content and drawing status. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Canvas { /** * Creates a Canvas object that uses a PixelMap as the drawing target. @@ -1227,6 +2309,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a Canvas object that uses a PixelMap as the drawing target. + * @param { image.PixelMap } pixelmap - PixelMap used to create the object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(pixelmap: image.PixelMap); /** @@ -1237,6 +2329,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a rectangle. By default, black is used for filling. + * @param { common2D.Rect } rect - Rectangle to draw. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ drawRect(rect: common2D.Rect): void; /** @@ -1250,15 +2352,37 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawRect(left: number, top: number, right: number, bottom: number): void; - + /** + * Draws a rectangle. By default, black is used for filling. This API provides better performance than drawRect and is recommended. + * @param { number } left - X coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @param { number } top - Y coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @param { number } right - X coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @param { number } bottom - Y coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + drawRect(left: number, top: number, right: number, bottom: number): void; + + /** + * Draws a rounded rectangle. + * @param { RoundRect } roundRect - Indicates the RectRound object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ /** * Draws a rounded rectangle. * @param { RoundRect } roundRect - Indicates the RectRound object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 */ drawRoundRect(roundRect: RoundRect): void; @@ -1272,6 +2396,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws two nested rounded rectangles. The outer rectangle boundary must contain the inner rectangle boundary. + * Otherwise, there is no drawing effect. + * @param { RoundRect } outer - Outer rounded rectangle. + * @param { RoundRect } inner - Inner rounded rectangle. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawNestedRoundRect(outer: RoundRect, inner: RoundRect): void; /** @@ -1282,6 +2417,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Uses a brush to fill the drawable area of the canvas. + * @param { Brush } brush - Indicates the Brush object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawBackground(brush: Brush): void; /** @@ -1299,6 +2443,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a spot shadow and uses a given path to outline the ambient shadow. + * @param { Path } path - Path object, which is used to outline the shadow. + * @param { common2D.Point3d } planeParams - 3D vector, which is used to determine the z-axis offset of an occluder relative to the canvas, + * based on its x and y coordinates. + * @param { common2D.Point3d } devLightPos - Position of the light relative to the canvas. + * @param { number } lightRadius - Radius of the light. The value is a floating point number. + * @param { common2D.Color } ambientColor - Color of the ambient shadow. + * @param { common2D.Color } spotColor - Color of the spot shadow. + * @param { ShadowFlag } flag - Shadow flag. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, ambientColor: common2D.Color, spotColor: common2D.Color, flag: ShadowFlag) : void; @@ -1316,6 +2476,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Draws a spot shadow and uses a given path to outline the ambient shadow. + * @param { Path } path - Path object, which is used to outline the shadow. + * @param { common2D.Point3d } planeParams - 3D vector, which is used to calculate the offset in the Z axis. + * @param { common2D.Point3d } devLightPos - Position of the light relative to the canvas. + * @param { number } lightRadius - Radius of the light. The value is a floating point number. + * @param { common2D.Color | number } ambientColor - Ambient shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * @param { common2D.Color | number } spotColor - Spot shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * @param { ShadowFlag } flag - Indicates the flag to control opaque occluder, shadow, and light position. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, ambientColor: common2D.Color | number, spotColor: common2D.Color | number, flag: ShadowFlag) : void; @@ -1329,6 +2504,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a circle. If the radius is less than or equal to zero, nothing is drawn. By default, black is used for filling. + * @param { number } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { number } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { number } radius - Radius of the circle. The value is a floating point number greater than 0. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawCircle(x: number, y: number, radius: number): void; /** @@ -1351,6 +2537,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws an image. The coordinates of the upper left corner of the image are (left, top). + * @param { image.PixelMap } pixelmap - PixelMap. + * @param { number } left - X coordinate of the upper left corner of the image. The value is a floating point number. + * @param { number } top - Y coordinate of the upper left corner of the image. The value is a floating point number. + * @param { SamplingOptions } samplingOptions - Sampling options. By default, the SamplingOptions object created using the no-argument constructor is used. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawImage(pixelmap: image.PixelMap, left: number, top: number, samplingOptions?: SamplingOptions): void; /** @@ -1369,6 +2567,23 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Splits an image into multiple sections based on the lattice object's configuration and + * draws each section into the specified target rectangle on the canvas. + * The intersections of even-numbered rows and columns (starting from 0) are fixed points. + * If the fixed lattice area fits within the target rectangle, it will be drawn without scaling. + * Otherwise, it will be scaled proportionally to fit the target rectangle. + * Any remaining space will be filled by stretching or compressing the remaining sections to cover the entire target rectangle. + * @param { image.PixelMap } pixelmap - The source image. + * @param { Lattice } lattice - The area of source image. + * @param { common2D.Rect } dstRect - The area of destination canvas. + * @param { FilterMode } filterMode - Filter mode. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawImageLattice(pixelmap: image.PixelMap, lattice: Lattice, dstRect: common2D.Rect, filterMode: FilterMode): void; @@ -1386,6 +2601,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Splits an image into nine sections using two horizontal and two vertical lines: four edge sections, four corner sections, and a central section. + * If the four corner sections are smaller than the target rectangle, they will be drawn in the target rectangle without scaling. + * Otherwise, they will be scaled to fit the target rectangle. Any remaining space will be filled by stretching or + * compressing the other five sections to cover the entire target rectangle. + * @param { image.PixelMap } pixelmap - PixelMap to split. + * @param { common2D.Rect } center - Central rectangle that divides the image into nine sections by extending its four edges. + * @param { common2D.Rect } dstRect - Target rectangle drawn on the canvas. + * @param { FilterMode } filterMode - Filter mode. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawImageNine(pixelmap: image.PixelMap, center: common2D.Rect, dstRect: common2D.Rect, filterMode: FilterMode): void; @@ -1400,6 +2630,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws an image onto a specified area of the canvas. + * @param { image.PixelMap } pixelmap - The source image. + * @param { common2D.Rect } dstRect - Rectangle object, which specifies the area of the canvas onto which the image will be drawn. + * @param { SamplingOptions } samplingOptions - Sampling options. + * By default, the SamplingOptions object created using the no-argument constructor is used. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ drawImageRect(pixelmap: image.PixelMap, dstRect: common2D.Rect, samplingOptions?: SamplingOptions): void; /** @@ -1415,6 +2658,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a portion of an image onto a specified area of the canvas. + * @param { image.PixelMap } pixelmap - The source image. + * @param { common2D.Rect } srcRect - Rectangle object, which specifies the portion of the image to draw. + * @param { common2D.Rect } dstRect - Rectangle object, which specifies the area of the canvas onto which the image will be drawn. + * @param { SamplingOptions } samplingOptions - Sampling options. + * By default, the SamplingOptions object created using the no-argument constructor is used. + * @param { SrcRectConstraint } constraint - Constraint type of the source rectangle. The default value is STRICT. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawImageRectWithSrc(pixelmap: image.PixelMap, srcRect: common2D.Rect, dstRect: common2D.Rect, samplingOptions?: SamplingOptions, constraint?: SrcRectConstraint): void; @@ -1427,6 +2684,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Fills the drawable area of the canvas with the specified color and blend mode. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @param { BlendMode } blendMode - Blend mode. The default mode is SRC_OVER. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawColor(color: common2D.Color, blendMode?: BlendMode): void; /** @@ -1445,6 +2712,23 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Fills the drawable area of the canvas with the specified color and blend mode. This API provides better performance and is recommended. + * @param { number } alpha - Alpha channel value of the color in ARGB format. + * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down. + * @param { number } red - Red channel value of the color in ARGB format. + * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down. + * @param { number } green - Green channel value of the color in ARGB format. + * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down. + * @param { number } blue - Blue channel value of the color in ARGB format. + * The value is an integer ranging from 0 to 255. Any passed-in floating point number is rounded down. + * @param { BlendMode } blendMode - Blend mode. The default mode is SRC_OVER. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawColor(alpha: number, red: number, green: number, blue: number, blendMode?: BlendMode): void; /** @@ -1456,6 +2740,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Fills the drawable area of the canvas with the specified color and blend mode. + * @param { number } color - Color in hexadecimal ARGB format. + * @param { BlendMode } blendMode - Blend mode. The default mode is SRC_OVER. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawColor(color: number, blendMode?: BlendMode): void; /** @@ -1466,6 +2760,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws an oval on the canvas, where the shape and position of the oval are defined by its bounding rectangle. + * @param { common2D.Rect } oval - Rectangle. The oval inscribed within the rectangle is the oval to draw. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawOval(oval: common2D.Rect): void; /** @@ -1485,6 +2788,24 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws an arc on the canvas, with the start angle and sweep angle specified. + * If the absolute value of the sweep angle exceeds 360 degrees, an ellipse is drawn. + * @param { common2D.Rect } arc - Rectangular boundary that encapsulates the oval including the arc. + * @param { number } startAngle - Start angle, in degrees. The value is a floating point number. + * When the degree is 0, the start point is located at the right end of the oval. + * A positive number indicates that the start point is placed clockwise, + * and a negative number indicates that the start point is placed counterclockwise. + * @param { number } sweepAngle - Angle to sweep, in degrees. The value is a floating point number. + * A positive number indicates a clockwise sweep, and a negative value indicates a counterclockwise swipe. + * The valid range is from -360 degrees to 360 degrees. If the absolute value of the sweep angle exceeds 360 degrees, + * an ellipse is drawn. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawArc(arc: common2D.Rect, startAngle: number, sweepAngle: number): void; /** @@ -1503,6 +2824,23 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Draws an arc on the canvas. It enables you to define the start angle, sweep angle, + * and whether the arc's endpoints should connect to its center. + * @param { common2D.Rect } arc - Rectangular boundary that encapsulates the oval including the arc. + * @param { number } startAngle - Start angle, in degrees. The value is a floating point number. + * When the degree is 0, the start point is located at the right end of the oval. + * A positive number indicates that the start point is placed clockwise, + * and a negative number indicates that the start point is placed counterclockwise. + * @param { number } sweepAngle - Angle to sweep, in degrees. The value is a floating point number. + * A positive number indicates a clockwise sweep, and a negative value indicates a counterclockwise swipe. + * The swipe angle can exceed 360 degrees, and a complete ellipse is drawn. + * @param { boolean } useCenter - Whether the start point and end point of the arc are connected to its center. + * The value true means that they are connected to the center; the value false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawArcWithCenter(arc: common2D.Rect, startAngle: number, sweepAngle: number, useCenter: boolean): void; /** @@ -1514,6 +2852,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a point. + * @param { number } x - X coordinate of the point. The value is a floating point number. + * @param { number } y - Y coordinate of the point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawPoint(x: number, y: number): void; /** @@ -1525,18 +2873,49 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a group of points, line segments, or polygons on the canvas, with the specified drawing mode. An array is used to hold these points. + * @param { Array } points - Array that holds the points to draw. The length cannot be 0. + * @param { PointMode } mode - Mode in which the points are drawn. The default value is drawing.PointMode.POINTS. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawPoints(points: Array, mode?: PointMode): void; /** - * Draws a custom path, which contains a set of path outlines. Each path outline can be open or closed. - * @param { Path } path - Path object to draw. + * Draws a custom path, which contains a set of path outlines. Each path outline can be open or closed. + * @param { Path } path - Path object to draw. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 11 + */ + /** + * Draws a custom path, which contains a set of path outlines. Each path outline can be open or closed. + * @param { Path } path - Path object to draw. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + drawPath(path: Path): void; + + /** + * Draws a line segment from the start point to the end point. If the coordinates of the start point are the same as those of the end point, + * nothing is drawn. + * @param { number } x0 - X coordinate of the start point of the line segment. The value is a floating point number. + * @param { number } y0 - Y coordinate of the start point of the line segment. The value is a floating point number. + * @param { number } x1 - X coordinate of the end point of the line segment. The value is a floating point number. + * @param { number } y1 - Y coordinate of the end point of the line segment. The value is a floating point number. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - drawPath(path: Path): void; - /** * Draws a line segment from the start point to the end point. If the coordinates of the start point are the same as those of the end point, * nothing is drawn. @@ -1547,7 +2926,8 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @crossplatform + * @since 20 */ drawLine(x0: number, y0: number, x1: number, y1: number): void; @@ -1565,8 +2945,37 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a single character. If the typeface of the current font does not support the character to draw, + * the system typeface is used to draw the character. + * @param { string } text - Single character to draw. The length of the string must be 1. + * @param { Font } font - Font object. + * @param { number } x - X coordinate of the left point (red point in the figure below) of the character baseline (blue line in the figure below). + * The value is a floating point number. + * @param { number } y - Y coordinate of the left point (red point in the figure below) of the character baseline (blue line in the figure below). + * The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawSingleCharacter(text: string, font: Font, x: number, y: number): void; + /** + * Draws a single character with font feature. + * @param { string } text - A string containing only a single character. + * @param { Font } font - Font object. + * @param { number } x - X coordinate of the single character start point. + * @param { number } y - Y coordinate of the single character start point. + * @param { Array } features - Font Feature Array. + * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + drawSingleCharacterWithFeatures(text: string, font: Font, x: number, y: number, features: Array): void; + /** * Draws a text blob. If the typeface used to construct blob does not support a character, that character will not be drawn. * @param { TextBlob } blob - TextBlob to draw. @@ -1579,6 +2988,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Draws a text blob. If the typeface used to construct blob does not support a character, that character will not be drawn. + * @param { TextBlob } blob - TextBlob to draw. + * @param { number } x - X coordinate of the left point (red point in the figure below) of the text baseline (blue line in the figure below). + * The value is a floating point number. + * @param { number } y - Y coordinate of the left point (red point in the figure below) of the text baseline (blue line in the figure below). + * The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawTextBlob(blob: TextBlob, x: number, y: number): void; /** @@ -1597,6 +3019,24 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a PixelMap based on a mesh, where mesh vertices are evenly distributed across the PixelMap. + * @param { image.PixelMap } pixelmap - PixelMap to draw. + * @param { number } meshWidth - Number of columns in the mesh. The value is an integer greater than 0. + * @param { number } meshHeight - Number of rows in the mesh. The value is an integer greater than 0. + * @param { Array } vertices - Array of vertices, which specify the position to draw. + * The value is a floating-point array and the size must be ((meshWidth+1) * (meshHeight+1) + vertOffset) * 2. + * @param { number } vertOffset - Number of vert elements to skip before drawing. The value is an integer greater than or equal to 0. + * @param { Array } colors - Array of colors, which specify the color at each vertex. + * The value is an integer array and can be null. The size must be (meshWidth+1) * (meshHeight+1) + colorOffset. + * @param { number } colorOffset - Number of color elements to skip before drawing. The value is an integer greater than or equal to 0. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ drawPixelMapMesh(pixelmap: image.PixelMap, meshWidth: number, meshHeight: number, vertices: Array, vertOffset: number, colors: Array, colorOffset: number): void; @@ -1608,6 +3048,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws a region. + * @param { Region } region - Region to draw. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ drawRegion(region: Region): void; /** @@ -1618,6 +3067,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Attaches a pen to the canvas. When you draw on the canvas, the pen's style is used to outline shapes. + * @param { Pen } pen - Pen object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ attachPen(pen: Pen): void; /** @@ -1628,6 +3087,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Attaches a brush to the canvas. When you draw on the canvas, the brush's style is used to fill the interior of shapes. + * @param { Brush } brush - Brush object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ attachBrush(brush: Brush): void; /** @@ -1635,6 +3104,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Detaches the pen from the canvas. When you draw on the canvas, the pen is no longer used to outline shapes. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ detachPen(): void; /** @@ -1642,6 +3118,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Detaches the brush from the canvas. When you draw on the canvas, the brush is no longer used to fill the interior of shapes. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ detachBrush(): void; /** @@ -1650,6 +3133,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Saves the canvas states (canvas matrix and drawable area) to the top of the stack. This API must be used in pair with restore. + * @returns { number } Number of canvas statuses. The value is a positive integer. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ save(): number; /** @@ -1664,6 +3155,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Saves the matrix and cropping region of the canvas, and allocates a PixelMap for subsequent drawing. + * If you call restore, changes made to the matrix and clipping region are discarded, and the PixelMap is drawn. + * @param { common2D.Rect | null} rect - Rect object, which is used to limit the size of the graphics layer. + * The default value is the current canvas size. + * @param { Brush | null} brush - Brush object. The alpha value, filter effect, and blend mode of the brush are applied when the PixelMap is drawn. + * If null is passed in, no effect is applied. + * @returns { number } Number of canvas statuses that have been saved. The value is a positive integer. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ saveLayer(rect?: common2D.Rect | null, brush?: Brush | null): number; /** @@ -1674,6 +3179,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Clears the canvas with a given color. This API has the same effect as drawColor. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ clear(color: common2D.Color): void; /** @@ -1682,6 +3196,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Clears the canvas with a given color. + * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ clear(color: common2D.Color | number): void; /** @@ -1689,6 +3210,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Restores the canvas state (canvas matrix and clipping area) saved on the top of the stack. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ restore(): void; /** @@ -1701,6 +3229,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Restores the canvas state (canvas matrix and clipping area) to a specified number. + * @param { number } count - Depth of the canvas statuses to restore. The value is an integer. + * If the value is less than or equal to 1, the canvas is restored to the initial state. + * If the value is greater than the number of canvas statuses that have been saved, no operation is performed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ restoreToCount(count: number): void; /** @@ -1709,6 +3248,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the number of canvas states (canvas matrix and clipping area) saved in the stack. + * @returns { number } Number of canvas statuses that have been saved. The value is a positive integer. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getSaveCount(): number; /** @@ -1717,6 +3264,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the canvas width. + * @returns { number } Canvas width. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getWidth(): number; /** @@ -1725,6 +3279,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the canvas height. + * @returns { number } Canvas height. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getHeight(): number; /** @@ -1733,6 +3294,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the bounds of the cropping region of the canvas. + * @returns { common2D.Rect } Rect object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getLocalClipBounds(): common2D.Rect; /** @@ -1741,6 +3309,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the canvas matrix. + * @returns { Matrix } Canvas matrix. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getTotalMatrix(): Matrix; /** @@ -1753,6 +3328,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Applies a scaling matrix on top of the current canvas matrix (identity matrix by default). + * Subsequent drawing and clipping operations will automatically have a scaling effect applied to the shapes and positions. + * @param { number } sx - Scale ratio on the X axis. The value is a floating point number. + * @param { number } sy - Scale ratio on the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ scale(sx: number, sy: number): void; /** @@ -1769,6 +3355,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Applies a skewing matrix on top of the current canvas matrix (identity matrix by default). + * Subsequent drawing and clipping operations will automatically have a skewing effect applied to the shapes and positions. + * @param { number } sx - Amount of tilt on the X axis. The value is a floating point number. + * A positive number tilts the drawing rightwards along the positive direction of the Y axis, + * and a negative number tilts the drawing leftwards along the positive direction of the Y axis. + * @param { number } sy - Amount of tilt on the Y axis. The value is a floating point number. + * A positive number tilts the drawing downwards along the positive direction of the X axis, + * and a negative number tilts the drawing upwards along the positive direction of the X axis. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ skew(sx: number, sy: number) : void; /** @@ -1783,6 +3384,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Applies a rotation matrix on top of the current canvas matrix (identity matrix by default). + * Subsequent drawing and clipping operations will automatically have a rotation effect applied to their shapes and positions. + * @param { number } degrees - Angle to rotate, in degrees. The value is a floating point number. + * A positive value indicates a clockwise rotation, and a negative value indicates a counterclockwise rotation. + * @param { number } sx - X coordinate of the rotation center. The value is a floating point number. + * @param { number } sy - Y coordinate of the rotation center. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ rotate(degrees: number, sx: number, sy: number) : void; /** @@ -1795,8 +3410,30 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - translate(dx: number, dy: number): void; - + /** + * Applies a translation matrix on top of the current canvas matrix (identity matrix by default). + * Subsequent drawing and clipping operations will automatically have a translation effect applied to the shapes and positions. + * @param { number } dx - Distance to translate on the X axis. The value is a floating point number. + * @param { number } dy - Distance to translate on the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + translate(dx: number, dy: number): void; + + /** + * Clips the drawable area of the canvas using a custom path. + * @param { Path } path - To combine with clip. + * @param { ClipOp } clipOp - Clip mode. The default value is INTERSECT. + * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, + * and false means the opposite. The default value is false. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ /** * Clips the drawable area of the canvas using a custom path. * @param { Path } path - To combine with clip. @@ -1806,7 +3443,8 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 */ clipPath(path: Path, clipOp?: ClipOp, doAntiAlias?: boolean): void; @@ -1821,6 +3459,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Clips the drawable area of the canvas using a rectangle. + * @param { common2D.Rect } rect - To combine with clipping area. + * @param { ClipOp } clipOp - Clip mode. The default value is INTERSECT. + * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, + * and false means the opposite. The default value is false. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ clipRect(rect: common2D.Rect, clipOp?: ClipOp, doAntiAlias?: boolean): void; /** @@ -1832,6 +3482,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Multiplies the current canvas matrix by the incoming matrix on the left. This API does not affect previous drawing operations, + * but subsequent drawing and clipping operations will be influenced by this matrix in terms of shape and position. + * @param { Matrix } matrix - Declares functions related to the matrix object in the drawing module. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ concatMatrix(matrix: Matrix): void; /** @@ -1843,6 +3503,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Clips a region on the canvas. + * @param { Region } region - Region object, which indicates the range to clip. + * @param { ClipOp } clipOp - Clipping mode. The default value is INTERSECT. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ clipRegion(region: Region, clipOp?: ClipOp): void; /** @@ -1856,6 +3526,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Clips a rounded rectangle on the canvas. + * @param { RoundRect } roundRect - To combine with clipping area. + * @param { ClipOp } clipOp - Clipping mode. The default value is INTERSECT. + * @param { boolean } doAntiAlias - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, + * and false means the opposite. The default value is false. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ clipRoundRect(roundRect: RoundRect, clipOp?: ClipOp, doAntiAlias?: boolean): void; /** @@ -1864,6 +3546,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether the region that can be drawn is empty after clipping. + * @returns { boolean } Returns true if drawable area is empty. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isClipEmpty(): boolean; /** @@ -1874,6 +3563,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a matrix for the canvas. Subsequent drawing and clipping operations will be affected by this matrix in terms of shape and position. + * @param { Matrix } matrix - Declares functions related to the matrix object in the drawing module. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setMatrix(matrix: Matrix): void; /** @@ -1881,6 +3579,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Resets the matrix of this canvas to an identity matrix. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ resetMatrix(): void; /** @@ -1890,6 +3594,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Checks whether the path is not intersecting with the canvas area. The canvas area includes its boundaries. + * @param { Path } path - Path to draw. + * @returns { boolean } Returns true if path is not intersect; returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ quickRejectPath(path: Path): boolean; /** @@ -1899,6 +3611,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Checks whether the rectangle is not intersecting with the canvas area. The canvas area includes its boundaries. + * @param { common2D.Rect } rect - Rectangle to determines. + * @returns { boolean } Returns true if rect and region is not intersect; returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ quickRejectRect(rect: common2D.Rect): boolean; } @@ -1909,18 +3629,41 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the canvas clipping modes. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum ClipOp { /** * Clips a specified area. That is, the difference set is obtained. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Clips a specified area. That is, the difference set is obtained. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DIFFERENCE = 0, /** * Retains a specified area. That is, the intersection is obtained. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Retains a specified area. That is, the intersection is obtained. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ INTERSECT = 1, } @@ -1930,6 +3673,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes a series of consecutive glyphs with the same attributes in a text blob. + * @typedef TextBlobRunBuffer + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ interface TextBlobRunBuffer { /** * Index of the glyph. The value is an integer. If a floating point number is passed in, the value is rounded down. @@ -1937,6 +3687,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Index of the glyph. The value is an integer. If a floating point number is passed in, the value is rounded down. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ glyph: number; /** * X coordinate of the start point of the text blob. The value is a floating point number. @@ -1944,6 +3701,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * X coordinate of the start point of the text blob. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ positionX: number; /** * Y coordinate of the start point of the text blob. The value is a floating point number. @@ -1951,6 +3715,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Y coordinate of the start point of the text blob. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ positionY: number; } @@ -1961,30 +3732,62 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enumerates the text encoding types. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum TextEncoding { /** * One byte is used to indicate UTF-8 or ASCII characters. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * One byte is used to indicate UTF-8 or ASCII characters. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TEXT_ENCODING_UTF8 = 0, /** * Two bytes are used to indicate most Unicode characters. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Two bytes are used to indicate most Unicode characters. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TEXT_ENCODING_UTF16 = 1, /** * Four bytes are used to indicate all Unicode characters. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Four bytes are used to indicate all Unicode characters. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TEXT_ENCODING_UTF32 = 2, /** * Two bytes are used to indicate the glyph index. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Two bytes are used to indicate the glyph index. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TEXT_ENCODING_GLYPH_ID = 3, } @@ -1995,6 +3798,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Defines a block consisting of one or more characters with the same font. + * + * class TextBlob + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class TextBlob { /** * Converts a value of the string type into a TextBlob object. @@ -2009,6 +3820,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Converts a value of the string type into a TextBlob object. + * @param { string } text - Content to be used for drawing the text blob. + * @param { Font } font - Specify text size, font, text scale, etc. + * @param { TextEncoding } encoding - Encoding type. The default value is TEXT_ENCODING_UTF8. + * Currently, only TEXT_ENCODING_UTF8 takes effect, and other encoding types are treated as TEXT_ENCODING_UTF8. + * @returns { TextBlob } TextBlob object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static makeFromString(text: string, font: Font, encoding?: TextEncoding): TextBlob; /** @@ -2026,6 +3851,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a TextBlob object from the text. + * The coordinates of each font in the TextBlob object are determined by the coordinate information in the points array. + * @param { string } text - Content to be used for drawing the text blob. + * @param { number } len - Number of fonts. The value is an integer and is obtained from countText. + * @param { common2D.Point[] } points - Array of points, which are used to specify the coordinates of each font. + * The array length must be the same as the value of len. + * @param { Font } font - Specify text size, font, text scale, etc. + * @returns { TextBlob } TextBlob object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static makeFromPosText(text: string, len: number, points: common2D.Point[], font: Font): TextBlob; /** @@ -2040,6 +3881,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a Textblob object based on the RunBuffer information. + * @param { Array } pos - The array of TextBlobRunBuffer. + * @param { Font } font - Font used for this run. + * @param { common2D.Rect } bounds - Optional run bounding box. The default value is null; + * @returns { TextBlob } TextBlob object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static makeFromRunBuffer(pos: Array, font: Font, bounds?: common2D.Rect): TextBlob; /** @@ -2048,6 +3902,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Obtains the rectangular bounding box of the text blob. + * @returns { common2D.Rect } Rect object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ bounds(): common2D.Rect; /** @@ -2056,6 +3917,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the unique, non-zero identifier of this TextBlob object. + * @returns { number } Unique, non-zero identifier of this TextBlob object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ uniqueID(): number; } @@ -2064,6 +3932,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ class TypefaceArguments { /** @@ -2071,6 +3940,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(); /** @@ -2091,13 +3961,29 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes the style of a typeface, such as SimSun or KaiTi. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Typeface { /** - * Obtains the name of the typeface family, which is the name given to a collection of related typeface designs. + * Get the family name for this typeface. * @returns { string } Family name. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Get the family name for this typeface. + * @returns { string } Family name. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getFamilyName(): string; /** @@ -2108,8 +3994,17 @@ declare namespace drawing { * @crossplatform * @since 20 */ - makeFromCurrent(typefaceArguments: TypefaceArguments): Typeface; - + makeFromCurrent(typefaceArguments: TypefaceArguments): Typeface; + + /** + * Constructs a typeface from a file. + * @param { string } filePath - file path for typeface. + * @returns { Typeface } Typeface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ /** * Constructs a typeface from a file. * @param { string } filePath - file path for typeface. @@ -2117,7 +4012,9 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 */ static makeFromFile(filePath: string): Typeface; @@ -2132,6 +4029,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Constructs a typeface from a file, which must be stored in the resources/rawfile directory of the application project. + * @param { Resource } rawfile - Resource object corresponding to the file. + * Currently, only resource objects referenced in rawfile format are supported. + * The corresponding format is rawfile('filePath'), where filePath is the relative path of the file to the resources/rawfile directory in the project. + * If the file is stored in resources/rawfile, the reference format is rawfile('HarmonyOS_Sans_Bold.ttf'). + * If the file is stored in a subdirectory, for example, in resources/rawfile/ttf, the reference format is rawfile('ttf/HarmonyOS_Sans_Bold.ttf'). + * @returns { Typeface } Typeface. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static makeFromRawFile(rawfile: Resource): Typeface; /** @@ -2143,6 +4052,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ static makeFromFileWithArguments(filePath: string, typefaceArguments: TypefaceArguments): Typeface; @@ -2166,12 +4076,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the font edging types. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum FontEdging { /** * No anti-aliasing processing is used. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * No anti-aliasing processing is used. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ALIAS = 0, /** @@ -2179,6 +4103,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Uses anti-aliasing to smooth the jagged edges. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ANTI_ALIAS = 1, /** @@ -2186,6 +4116,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Uses sub-pixel anti-aliasing to provide a smoother effect for jagged edges. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ SUBPIXEL_ANTI_ALIAS = 2, } @@ -2196,12 +4132,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the font hinting types. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum FontHinting { /** * No font hinting is used. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * No font hinting is used. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ NONE = 0, /** @@ -2209,6 +4159,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Slight font hinting is used to improve contrast. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ SLIGHT = 1, /** @@ -2216,6 +4172,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Normal font hinting is used to improve contrast. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ NORMAL = 2, /** @@ -2223,6 +4185,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Full font hinting is used to improve contrast. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ FULL = 3, } @@ -2232,6 +4200,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes the attributes used for text rendering, such as size and typeface. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Font { /** * Enables subpixel font rendering. @@ -2242,6 +4218,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables subpixel font rendering. + * @param { boolean } isSubpixel - Whether to enable subpixel font rendering. + * The value true means to enable subpixel font rendering, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enableSubpixel(isSubpixel: boolean): void; /** @@ -2253,6 +4239,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables emboldened fonts. + * @param { boolean } isEmbolden - Whether to enable emboldened fonts. + * The value true means to enable emboldened fonts, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enableEmbolden(isEmbolden: boolean): void; /** @@ -2264,6 +4260,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables linear font scaling. + * @param { boolean } isLinearMetrics - Whether to enable linear font scaling. + * The value true means to enable linear font scaling, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enableLinearMetrics(isLinearMetrics: boolean): void; /** @@ -2275,6 +4281,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets the font size. + * @param { number } textSize - Font size. The value is a floating point number. + * If a negative number is passed in, the size is set to 0. If the size is 0, the text drawn will not be displayed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setSize(textSize: number): void; /** @@ -2283,6 +4300,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Obtains the font size. + * @returns { number } Font size. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getSize(): number; /** @@ -2293,6 +4317,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets the typeface style (including attributes such as font name, weight, and italic) for the font. + * @param { Typeface } typeface - Typeface style (including attributes such as font name, weight, and italic). + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setTypeface(typeface: Typeface): void; /** @@ -2301,6 +4335,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Obtains the typeface. + * @returns { Typeface } Typeface object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getTypeface(): Typeface; /** @@ -2309,6 +4351,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Obtains the font metrics of the typeface. + * @returns { FontMetrics } The fontMetrics value returned to the caller. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getMetrics(): FontMetrics; /** @@ -2321,8 +4371,31 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Measures the width of a single character. + * If the typeface of the current font does not support the character to measure, the system typeface is used to measure the character width. + * @param { string } text - Single character to measure. The length of the string must be 1. + * @returns { number } Width of the character. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ measureSingleCharacter(text: string): number; + /** + * Measure a single character with font feature. + * @param { string } text - A string containing only a single character. + * @param { Array } features - Font Feature Array. + * @returns { number } The width of the single character, in px. + * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + measureSingleCharacterWithFeatures(text: string, features: Array): number; + /** * Measures the text width. * @param { string } text - Text Symbol Content. @@ -2333,6 +4406,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Measures the text width. + * @param { string } text - Text Symbol Content. + * @param { TextEncoding } encoding - Encoding format. + * @returns { number } Width of the text. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ measureText(text: string, encoding: TextEncoding): number; /** @@ -2343,6 +4427,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a horizontal scale factor for this font. + * @param { number } scaleX - Horizontal scale factor. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setScaleX(scaleX: number): void; /** @@ -2354,6 +4447,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a horizontal skew factor for this font. + * @param { number } skewX - Horizontal skew factor. + * A positive number means a skew to the left, and a negative number means a skew to the right. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setSkewX(skewX: number): void; /** @@ -2364,6 +4467,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a font edging effect. + * @param { FontEdging } edging - Font edging effect. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setEdging(edging: FontEdging): void; /** @@ -2374,6 +4486,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a font hinting effect. + * @param { FontHinting } hinting - Font hinting effect. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setHinting(hinting: FontHinting): void; /** @@ -2385,6 +4506,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the number of glyphs represented by text. + * @param { string } text - Indicates the character storage encoded with text encoding. + * @returns { number } Returns the count of text. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ countText(text: string): number; /** @@ -2396,6 +4527,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets whether to request that baselines be snapped to pixels when the current canvas matrix is axis aligned. + * @param { boolean } isBaselineSnap - Whether to request that baselines be snapped to pixels. + * The value true means to request that baselines be snapped to pixels, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setBaselineSnap(isBaselineSnap: boolean): void; /** @@ -2405,6 +4546,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether baselines are requested to be snapped to pixels when the current canvas matrix is axis aligned. + * @returns { boolean } Check result. The value true means that the baselines are requested to be snapped to pixels, + * and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isBaselineSnap(): boolean; /** @@ -2416,6 +4565,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets whether to use bitmaps in this font. + * @param { boolean } isEmbeddedBitmaps - Whether to use bitmaps in the font. The value true means to use bitmaps in the font, + * and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setEmbeddedBitmaps(isEmbeddedBitmaps: boolean): void; /** @@ -2424,6 +4583,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether bitmaps are used in this font. + * @returns { boolean } Check result. The value true means that the bitmaps are used, and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isEmbeddedBitmaps(): boolean; /** @@ -2435,6 +4601,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets whether to forcibly use auto hinting, that is, whether to always hint glyphs. + * @param { boolean } isForceAutoHinting - Whether to forcibly use auto hinting. The value true means to forcibly use auto hinting, + * and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setForceAutoHinting(isForceAutoHinting: boolean): void; /** @@ -2443,6 +4619,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether auto hinting is forcibly used. + * @returns { boolean } Check result. The value true means that auto hinting is forcibly used, and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isForceAutoHinting(): boolean; /** @@ -2454,6 +4637,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the width of each glyph in an array. + * @param { Array } glyphs - Glyph array, which can be generated by textToGlyphs. + * @returns { Array } Glyph array, which can be generated by textToGlyphs. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getWidths(glyphs: Array): Array; /** @@ -2467,6 +4660,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Converts text into glyph indexes. + * @param { string } text - Text string. + * @param { number } glyphCount - Number of glyphs represented by the text. The value must be the same as the value obtained from countText. + * The default value is the number of characters in the text string. The value is an integer. + * @returns { Array } Returns the storage for glyph indices. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ textToGlyphs(text: string, glyphCount?: number): Array; /** @@ -2475,6 +4680,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether sub-pixel rendering is used for this font. + * @returns { boolean } Check result. The value true means that sub-pixel rendering is used, and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isSubpixel(): boolean; /** @@ -2483,6 +4695,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether linear scaling is used for this font. + * @returns { boolean } Checks whether linear scaling is used for this font. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isLinearMetrics(): boolean; /** @@ -2491,6 +4710,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the horizontal skew factor of this font. + * @returns { number } Horizontal skew factor. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getSkewX(): number; /** @@ -2500,6 +4726,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether the bold effect is set for this font. + * @returns { boolean } Check result. The value true means that the bold effect is set, and false means the opposite. + * returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isEmbolden(): boolean; /** @@ -2508,6 +4742,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the horizontal scale ratio of this font. + * @returns { number } Horizontal scale ratio. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getScaleX(): number; /** @@ -2516,6 +4757,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the font hinting effect. + * @returns { FontHinting } Font hinting effect. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getHinting(): FontHinting; /** @@ -2524,6 +4772,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the font edging effect. + * @returns { FontEdging } Font edging effect. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getEdging(): FontEdging; /** @@ -2534,6 +4789,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the outline path of a glyph. + * @param { number } index - Index of the glyph. + * @returns { Path } Outline path of the glyph. + * Note: Path use y-axis-goes-down system, y axis is inverted to the y-axis-goes-up system. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ createPathForGlyph(index: number): Path; /** @@ -2546,6 +4810,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the rectangular bounding box of each glyph in an array. + * @param { Array } glyphs - Glyph array, which can be generated by textToGlyphs. + * @returns { Array } Array that holds the rectangular bounding boxes. + * Note: 1. Rect use y-axis-goes-down system, y axis is inverted to the y-axis-goes-up system. + *
2. Rect use two points(left-bottom & right-top) to describe the bound. + *
3. The bound rect will be snap to integral boundaries. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getBounds(glyphs: Array): Array; /** @@ -2561,6 +4836,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the outline path of a text. + * @param { string } text - UTF-8 text-encoded characters. + * @param { number } byteLength - Length of the outline path, + * which is obtained based on the minimum value between the passed value of byteLength and the actual text byte size. + * @param { number } x - X coordinate of the text in the drawing area, with the origin as the start point. + * @param { number } y - Y coordinate of the text in the drawing area, with the origin as the start point. + * @returns { Path } Outline path of the text. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getTextPath(text: string, byteLength: number, x: number, y: number): Path; /** @@ -2573,6 +4862,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 15 */ + /** + * Sets whether to follow the theme font. When followed is set to true, + * the theme font is used if it is enabled by the system and no typeface is set. + * @param { boolean } followed - Whether to follow the theme font. + * The value true means to follow the theme font, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setThemeFontFollowed(followed: boolean): void; /** @@ -2581,6 +4881,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 15 */ + /** + * Checks whether the font follows the theme font. By default, the font follows the theme font. + * @returns { boolean } Check result. The value true means that the theme font is followed, and false means the opposite. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isThemeFontFollowed(): boolean; } @@ -2590,12 +4897,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the font measurement flags, which is used to specify whether a field in the font measurement information is valid. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum FontMetricsFlags { /** * The underlineThickness field in the FontMetrics struct is valid. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The underlineThickness field in the FontMetrics struct is valid. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ UNDERLINE_THICKNESS_VALID = 1 << 0, /** @@ -2603,6 +4923,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The underlinePosition field in the FontMetrics struct is valid. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ UNDERLINE_POSITION_VALID = 1 << 1, /** @@ -2610,6 +4936,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The strikethroughThickness field in the FontMetrics struct is valid. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ STRIKETHROUGH_THICKNESS_VALID = 1 << 2, /** @@ -2617,6 +4949,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The strikethroughPosition field in the FontMetrics struct is valid. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ STRIKETHROUGH_POSITION_VALID = 1 << 3, /** @@ -2624,6 +4962,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The boundary metrics (such as top, bottom, xMin, and xMax) in the FontMetrics struct are invalid. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ BOUNDS_INVALID = 1 << 4, } @@ -2633,6 +4977,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Describes the attributes that describe the font size and layout. A typeface has similar font metrics. + * @typedef FontMetrics + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ interface FontMetrics { /** * Font measurement flags that are valid. @@ -2640,6 +4992,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Font measurement flags that are valid. + * @type { ?FontMetricsFlags } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ flags?: FontMetricsFlags; /** @@ -2648,6 +5007,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Maximum distance from the baseline to the highest coordinate of the text. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ top: number; /** * Distance from the baseline to the highest coordinate of the text. The value is a floating point number. @@ -2655,6 +5022,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Distance from the baseline to the highest coordinate of the text. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ ascent: number; /** * Distance from the baseline to the lowest coordinate of the text. The value is a floating point number. @@ -2662,6 +5037,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Distance from the baseline to the lowest coordinate of the text. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ descent: number; /** * Maximum distance from the baseline to the lowest coordinate of the text. The value is a floating point number. @@ -2669,6 +5052,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Maximum distance from the baseline to the lowest coordinate of the text. The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ bottom: number; /** * Interline spacing, that is, the distance from the descent of one line of text to the ascent of the next line. @@ -2677,6 +5068,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Interline spacing, that is, the distance from the descent of one line of text to the ascent of the next line. + * The value is a floating point number. + * @type { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ leading: number; /** * Average character width. @@ -2684,22 +5083,44 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Average character width. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ avgCharWidth?: number; /** - * Maximum character width. + * Maximum character width. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ + /** + * Maximum character width. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + maxCharWidth?: number; + + /** + * Horizontal distance from the leftmost edge of any glyph bounding box to the origin. + * This value is usually less than 0, indicating the minimum horizontal coordinate across all glyph bounding boxes. * @type { ?number } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - maxCharWidth?: number; - /** * Horizontal distance from the leftmost edge of any glyph bounding box to the origin. * This value is usually less than 0, indicating the minimum horizontal coordinate across all glyph bounding boxes. * @type { ?number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 */ xMin?: number; @@ -2710,6 +5131,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Horizontal distance from the rightmost edge of any glyph bounding box to the origin. + * The value is a positive number, indicating the maximum horizontal coordinate across all glyph bounding boxes. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ xMax?: number; /** @@ -2718,6 +5147,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Height of the lowercase letter x. The value is usually a negative value. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ xHeight?: number; /** @@ -2726,6 +5162,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Height of a capital letter. The value is usually a negative value. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ capHeight?: number; /** @@ -2734,6 +5177,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Thickness of the underline. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ underlineThickness?: number; /** @@ -2742,6 +5192,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Vertical distance from the baseline to the top of the underline. The value is usually a positive number. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ underlinePosition?: number; /** @@ -2750,6 +5207,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Thickness of the strikethrough. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ strikethroughThickness?: number; /** @@ -2758,6 +5222,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Vertical distance from the baseline to the bottom of the strikethrough. The value is usually a negative value. + * @type { ?number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ strikethroughPosition?: number; } @@ -2766,6 +5237,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a lattice object, which is used to divide an image by lattice. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Lattice { /** * Divides the image into lattices. The lattices on both even columns and even rows are fixed, @@ -2790,6 +5268,31 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Divides the image into lattices. The lattices on both even columns and even rows are fixed, + * and they are drawn at their original size if the target is large enough. + * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target, + * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space. + * @param { Array } xDivs - Array of X coordinates used to divide the image. The value is an integer. + * @param { Array } yDivs - Array of Y coordinates used to divide the image. The value is an integer. + * @param { number } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { number } fYCount - Size of the array that holds the Y coordinates. The value range is [0, 5]. + * @param { common2D.Rect | null } fBounds - Source bounds to draw. The rectangle parameter must be an integer. + * The default value is the rectangle size of the original image. If the rectangle parameter is a decimal, + * the decimal part is discarded and converted into an integer. + * @param { Array | null } fRectTypes - Array that holds the rectangle types. The default value is null. + * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @param { Array | null } fColors - Array that holds the colors used to fill the lattices. The default value is null. + * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @returns { Lattice } Lattice object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ static createImageLattice(xDivs: Array, yDivs: Array, fXCount: number, fYCount: number, fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; @@ -2817,6 +5320,31 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Divides the image into lattices. The lattices on both even columns and even rows are fixed, + * and they are drawn at their original size if the target is large enough. + * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target, + * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space. + * @param { Array } xDivs - Array of X coordinates used to divide the image. The value is an integer. + * @param { Array } yDivs - Array of Y coordinates used to divide the image. The value is an integer. + * @param { number } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { number } fYCount - Size of the array that holds the Y coordinates. The value range is [0, 5]. + * @param { common2D.Rect | null } fBounds - Source bounds to draw. The rectangle parameter must be an integer. + * The default value is the rectangle size of the original image. If the rectangle parameter is a decimal, + * the decimal part is discarded and converted into an integer. + * @param { Array | null } fRectTypes - Array that holds the rectangle types. The default value is null. + * If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @param { Array | null } fColors - Array that holds the colors used to fill the lattices. + * Each color is represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * The default value is null. If this parameter is specified, the array size must be (fXCount + 1) * (fYCount + 1). + * @returns { Lattice } Lattice object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createImageLattice(xDivs: Array, yDivs: Array, fXCount: number, fYCount: number, fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; } @@ -2827,12 +5355,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the types of rectangles used to fill the lattices. This enum is used only in Lattice. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum RectType { /** * Draws an image into the lattice. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws an image into the lattice. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DEFAULT = 0, /** @@ -2840,6 +5383,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the lattice to transparent. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ TRANSPARENT = 1, /** @@ -2847,6 +5397,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Draws the colors in the fColors array in Lattice into the lattice. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ FIXEDCOLOR = 2 } @@ -2855,6 +5412,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a mask filter. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class MaskFilter { /** * Creates a mask filter with a blur effect. @@ -2867,6 +5430,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a mask filter with a blur effect. + * @param { BlurType } blurType - Blur type. + * @param { number } sigma - Standard deviation of the Gaussian blur to apply. The value must be a floating point number greater than 0. + * @returns { MaskFilter } MaskFilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createBlurMaskFilter(blurType: BlurType, sigma: number): MaskFilter; } @@ -2876,24 +5451,49 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Enumerates the styles of the dashed path effect. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum PathDashStyle { /** * Translates only, not rotating with the path. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Translates only, not rotating with the path. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TRANSLATE = 0, /** * Rotates with the path. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Rotates with the path. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ROTATE = 1, /** * Rotates with the path and stretches or compresses at turns to enhance smoothness. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Rotates with the path and stretches or compresses at turns to enhance smoothness. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ MORPH = 2, } @@ -2902,6 +5502,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a path effect. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class PathEffect { /** * Creates a PathEffect object that converts a path into a dotted line. @@ -2915,6 +5521,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a PathEffect object that converts a path into a dotted line. + * @param { Array } intervals - Array of ON and OFF lengths of dotted lines. + * The number of arrays must be an even number and be greater than or equal to 2. + * @param { number } phase - Offset used during drawing. The value is a floating point number. + * @returns { PathEffect } PathEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createDashPathEffect(intervals: Array, phase: number): PathEffect; /** @@ -2927,6 +5546,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a path effect that transforms the sharp angle between line segments into a rounded corner with the specified radius. + * @param { number } radius - Radius of the rounded corner. The value must be greater than 0. The value is a floating point number. + * @returns { PathEffect } PathEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createCornerPathEffect(radius: number): PathEffect; /** @@ -2942,6 +5572,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates an effect that segments the path and scatters the segments in an irregular pattern along the path. + * @param { number } segLength - Distance along the path at which each segment is fragmented. The value is a floating point number. + * If a negative number or the value 0 is passed in, no effect is created. + * @param { number } dev - Maximum amount by which the end points of the segments can be randomly displaced during rendering. + * The value is a floating-point number. + * @param { number } seedAssist - Optional parameter to assist in generating a pseudo-random seed for the effect. + * The default value is 0, and the value is a 32-bit unsigned integer. + * @returns { PathEffect } PathEffect object. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createDiscretePathEffect(segLength: number, dev: number, seedAssist?: number): PathEffect; /** @@ -2953,6 +5597,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates a path effect by sequentially applying the inner effect and then the outer effect. + * @param { PathEffect } outer - Path effect that is applied second, overlaying the first effect. + * @param { PathEffect } inner - Inner path effect that is applied first. + * @returns { PathEffect } PathEffect object. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createComposePathEffect(outer: PathEffect, inner: PathEffect): PathEffect; /** @@ -2970,6 +5624,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates a dashed path effect based on the shape described by a path. + * @param { Path } path - Path that defines the shape to be used for filling each dash in the pattern. + * @param { number } advance - Distance between two consecutive dashes. The value is a floating point number greater than 0. + * Otherwise, an error code is thrown. + * @param { number } phase - Starting offset of the dash pattern. The value is a floating point number. + * The actual offset used is the absolute value of this value modulo the value of advance. + * @param { PathDashStyle } style - Style of the dashed path effect. + * @returns { PathEffect } PathEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createPathDashEffect(path: Path, advance: number, phase: number, style: PathDashStyle): PathEffect; /** @@ -2982,6 +5652,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates an overlay path effect based on two distinct path effects. + * Different from createComposePathEffect, this API applies each effect separately and then displays them as a simple overlay. + * @param { PathEffect } firstPathEffect - First path effect. + * @param { PathEffect } secondPathEffect - Second path effect. + * @returns { PathEffect } PathEffect object. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createSumPathEffect(firstPathEffect: PathEffect, secondPathEffect: PathEffect): PathEffect; } @@ -2992,6 +5673,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements the shader effect. After a shader effect is set for a pen or brush, + * the shader effect instead of the color attribute is used for drawing. In this case, + * the alpha value set for the pen or brush still takes effect. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class ShaderEffect { /** * Creates a ShaderEffect object with a single color. @@ -3000,7 +5689,17 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since 12 + */ + /** + * Creates a ShaderEffect object with a single color. + * @param { number } color - Color in the ARGB format. The value is a 32-bit unsigned integer. + * @returns { ShaderEffect } Returns the shader with single color ShaderEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 */ static createColorShader(color: number): ShaderEffect; @@ -3023,6 +5722,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a ShaderEffect object that generates a linear gradient between two points. + * @param { common2D.Point } startPt - Start point. + * @param { common2D.Point } endPt - End point. + * @param { Array } colors - Array of colors to distribute between the two points. + * The values in the array are 32-bit (ARGB) unsigned integers. + * @param { TileMode } mode - Tile mode of the shader effect. + * @param { Array | null } pos - Relative position of each color in the color array. + * The array length must be the same as that of colors. The first element in the array must be 0.0, + * the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index. + * The default value is null, indicating that colors are evenly distributed between the two points. + * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect. + * The default value is null, indicating the identity matrix. + * @returns { ShaderEffect } Returns a linear gradient ShaderEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createLinearGradient(startPt: common2D.Point, endPt: common2D.Point, colors: Array, mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; @@ -3046,6 +5765,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a ShaderEffect object that generates a radial gradient based on the center and radius of a circle. + * A radial gradient refers to the color transition that spreads out gradually from the center of a circle. + * @param { common2D.Point } centerPt - Center of the circle. + * @param { number } radius - Radius of the gradient. A negative number is invalid. The value is a floating point number. + * @param { Array } colors - Array of colors to distribute between the center and ending shape of the circle. + * The values in the array are 32-bit (ARGB) unsigned integers. + * @param { TileMode } mode - Tile mode of the shader effect. + * @param { Array | null } pos - Relative position of each color in the color array. + * The array length must be the same as that of colors. The first element in the array must be 0.0, the last element must be 1.0, + * and the middle elements must be between 0.0 and 1.0 and increase by index. + * The default value is null, indicating that colors are evenly distributed between the center and ending shape of the circle. + * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect. + * The default value is null, indicating the identity matrix. + * @returns { ShaderEffect } Returns a radial gradient ShaderEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createRadialGradient(centerPt: common2D.Point, radius: number, colors: Array, mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; @@ -3074,6 +5814,32 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a ShaderEffect object that generates a color sweep gradient around a given center point, + * either in a clockwise or counterclockwise direction. + * @param { common2D.Point } centerPt - Center of the circle. + * @param { Array } colors - Array of colors to distribute between the start angle and end angle. + * The values in the array are 32-bit (ARGB) unsigned integers. + * @param { TileMode } mode - Tile mode of the shader effect. + * @param { number } startAngle - Start angle of the sweep gradient, in degrees. + * The value 0 indicates the positive direction of the X axis. A positive number indicates an offset towards the positive direction, + * and a negative number indicates an offset towards the negative direction. The value is a floating point number. + * @param { number } endAngle - End angle of the sweep gradient, in degrees. + * The value 0 indicates the positive direction of the X axis. A positive number indicates an offset towards the positive direction, + * and a negative number indicates an offset towards the negative direction. A value less than the start angle is invalid. + * The value is a floating point number. + * @param { Array | null } pos - Relative position of each color in the color array. The array length must be the same as that of colors. + * The first element in the array must be 0.0, the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index. + * The default value is null, indicating that the colors are evenly distributed between the start angle and end angle. + * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect. + * The default value is null, indicating the identity matrix. + * @returns { ShaderEffect } Returns a sweep gradient ShaderEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createSweepGradient(centerPt: common2D.Point, colors: Array, mode: TileMode, startAngle: number, endAngle: number, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; @@ -3100,6 +5866,29 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a ShaderEffect object that generates a conical gradient between two given circles. + * @param { common2D.Point } startPt - Center of the start circle of the gradient. + * @param { number } startRadius - Radius of the start circle of the gradient. A negative number is invalid. + * The value is a floating point number. + * @param { common2D.Point } endPt - Center of the end circle of the gradient. + * @param { number } endRadius - Radius of the end circle of the gradient. A negative value is invalid. + * The value is a floating point number. + * @param { Array } colors - Array of colors to distribute between the start circle and end circle. + * The values in the array are 32-bit (ARGB) unsigned integers. + * @param { TileMode } mode - Tile mode of the shader effect. + * @param { Array | null } pos - Relative position of each color in the color array. The array length must be the same as that of colors. + * The first element in the array must be 0.0, the last element must be 1.0, and the middle elements must be between 0.0 and 1.0 and increase by index. + * The default value is null, indicating that colors are evenly distributed between the two circles. + * @param { Matrix | null } matrix - Matrix object used to perform matrix transformation on the shader effect. + * The default value is null, indicating the identity matrix. + * @returns { ShaderEffect } Returns a conical gradient ShaderEffect object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createConicalGradient(startPt: common2D.Point, startRadius: number, endPt: common2D.Point, endRadius: number, colors: Array, mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; @@ -3143,12 +5932,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the tile modes of the shader effect. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum TileMode { /** * Replicates the edge color if the shader effect draws outside of its original boundary. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Replicates the edge color if the shader effect draws outside of its original boundary. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CLAMP = 0, /** @@ -3156,6 +5958,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Repeats the shader effect in both horizontal and vertical directions. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ REPEAT = 1, /** @@ -3163,6 +5971,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Repeats the shader effect in both horizontal and vertical directions, alternating mirror images. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ MIRROR = 2, /** @@ -3170,6 +5984,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Renders the shader effect only within the original boundary. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ DECAL = 3, } @@ -3178,6 +5998,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a shadow layer. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class ShadowLayer { /** * Creates a ShadowLayer object. @@ -3193,6 +6019,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a ShadowLayer object. + * + * @param { number } blurRadius - Radius of the shadow layer. The value must be a floating point number greater than 0. + * @param { number } x - Offset on the X axis. The value is a floating point number. + * @param { number } y - Offset on the Y axis. The value is a floating point number. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @returns { ShadowLayer } ShadowLayer object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static create(blurRadius: number, x: number, y: number, color: common2D.Color): ShadowLayer; /** @@ -3209,6 +6050,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates a ShadowLayer object. + * + * @param { number } blurRadius - Radius of the shadow layer. The value must be a floating point number greater than 0. + * @param { number } x - Offset on the X axis. The value is a floating point number. + * @param { number } y - Offset on the Y axis. The value is a floating point number. + * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format. + * @returns { ShadowLayer } ShadowLayer object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static create(blurRadius: number, x: number, y: number, color: common2D.Color | number): ShadowLayer; } @@ -3218,6 +6074,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Defines a color filter. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class ColorFilter { /** * Creates a ColorFilter object with a given color and blend mode. @@ -3230,6 +6094,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a ColorFilter object with a given color and blend mode. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @param { BlendMode } mode - Blend mode. + * @returns { ColorFilter } Colorfilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ static createBlendModeColorFilter(color: common2D.Color, mode: BlendMode): ColorFilter; /** @@ -3243,6 +6120,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Creates a ColorFilter object with a given color and blend mode. + * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format. + * @param { BlendMode } mode - Blend mode. + * @returns { ColorFilter } Colorfilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ static createBlendModeColorFilter(color: common2D.Color | number, mode: BlendMode): ColorFilter; /** @@ -3256,6 +6146,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a ColorFilter object by combining another two color filters. + * @param { ColorFilter } outer - Color filter that takes effect later in the new filter. + * @param { ColorFilter } inner - Color filter that takes effect first in the new filter. + * @returns { ColorFilter } Colorfilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createComposeColorFilter(outer: ColorFilter, inner: ColorFilter): ColorFilter; /** @@ -3265,6 +6167,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a ColorFilter object that applies the sRGB gamma curve to the RGB channels. + * @returns { ColorFilter } Colorfilter object. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createLinearToSRGBGamma(): ColorFilter; /** @@ -3274,6 +6184,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a ColorFilter object that applies the RGB channels to the sRGB gamma curve. + * @returns { ColorFilter } Colorfilter object. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createSRGBGammaToLinear(): ColorFilter; /** @@ -3283,6 +6201,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Creates a ColorFilter object that multiplies the luma into the alpha channel and sets the RGB channels to zero. + * @returns { ColorFilter } Colorfilter. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createLumaColorFilter(): ColorFilter; /** * Creates a color filter object with a 4*5 color matrix. @@ -3294,6 +6220,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a color filter object with a 4*5 color matrix. + * @param { Array } matrix - An array of 20 numbers, indicating the 4*5 matrix. + * @returns { ColorFilter } Colorfilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createMatrixColorFilter(matrix: Array): ColorFilter; /** @@ -3316,6 +6253,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements an image filter. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class ImageFilter { /** * Creates an image filter with a given blur effect. @@ -3329,7 +6273,22 @@ declare namespace drawing { *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since 12 + */ + /** + * Creates an image filter with a given blur effect. + * @param { number } sigmaX - Standard deviation of the Gaussian blur along the X axis. The value must be a floating point number greater than 0. + * @param { number } sigmaY - Standard deviation of the Gaussian blur along the Y axis. The value must be a floating point number greater than 0. + * @param { TileMode } tileMode - Tile mode to apply to the edges. + * @param { ImageFilter | null } imageFilter - Filter to which the image filter will be applied. + * The default value is null, indicating that the image filter is directly applied to the original image. + * @returns { ImageFilter } ImageFilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 */ static createBlurImageFilter(sigmaX: number, sigmaY: number, tileMode: TileMode, imageFilter?: ImageFilter | null): ImageFilter; @@ -3345,6 +6304,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates an image filter object with a given color filter effect. + * @param { ColorFilter } colorFilter - Color filter. + * @param { ImageFilter | null } imageFilter - Filter to which the image filter will be applied. The default value is null, + * indicating that the image filter is directly applied to the original image. + * @returns { ImageFilter } ImageFilter object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static createFromColorFilter(colorFilter: ColorFilter, imageFilter?: ImageFilter | null): ImageFilter; /** @@ -3420,6 +6392,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the join styles of a pen. The join style defines the shape of the joints of a polyline segment drawn by the pen. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum JoinStyle { /** * Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate. @@ -3427,6 +6406,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Mitered corner. If the angle of a polyline is small, its miter length may be inappropriate. + * In this case, you need to use the miter limit to limit the miter length. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ MITER_JOIN = 0, /** @@ -3434,6 +6420,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Round corner. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ROUND_JOIN = 1, /** @@ -3441,6 +6433,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Bevel corner. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ BEVEL_JOIN = 2 } @@ -3450,12 +6448,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the cap styles of a pen. The cap style defines the style of both ends of a line segment drawn by the pen. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum CapStyle { /** * There is no cap style. Both ends of the line segment are cut off square. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * There is no cap style. Both ends of the line segment are cut off square. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ FLAT_CAP = 0, /** @@ -3463,6 +6474,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Square cap style. Both ends have a square, the height of which is half of the width of the line segment, with the same width. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ SQUARE_CAP = 1, /** @@ -3470,6 +6487,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Round cap style. Both ends have a semicircle centered, the diameter of which is the same as the width of the line segment. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ ROUND_CAP = 2 } @@ -3479,12 +6502,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the blur types of a mask filter. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum BlurType { /** * Both the outer edges and the inner solid parts are blurred. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Both the outer edges and the inner solid parts are blurred. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ NORMAL = 0, /** @@ -3492,6 +6528,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The inner solid part remains unchanged, while only the outer edges are blurred. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ SOLID = 1, /** @@ -3499,6 +6541,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Only the outer edges are blurred, with the inner solid part being fully transparent. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ OUTER = 2, /** @@ -3506,6 +6554,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Only the inner solid part is blurred, while the outer edges remain sharp. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ INNER = 3 } @@ -3514,12 +6568,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Defines a pen, which is used to describe the style and color to outline a shape. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Pen { /** * A constructor used to create a Pen object. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * A constructor used to create a Pen object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(); /** @@ -3530,6 +6598,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Copies a Pen object to create a new one. + * @param { Pen } pen - Pen object to copy. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(pen: Pen); /** @@ -3543,6 +6621,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the maximum ratio allowed between the sharp corner length of a polyline and its line width. + * When drawing a polyline with the pen, if JoinStyle is set to MITER_JOIN and this maximum ratio is exceeded, + * the corner will be displayed as beveled instead of mitered. + * @param { number } miter - Maximum ratio of the sharp corner length of the polyline to the line width. + * A negative number is processed as 4.0 during drawing. Non-negative numbers take effect normally. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setMiterLimit(miter: number): void; /** @@ -3551,6 +6641,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the maximum ratio allowed between the sharp corner length of a polyline and its line width. + * @returns { number } Returns the miter limit. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getMiterLimit(): number; /** @@ -3561,6 +6658,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the shader effect for this pen. + * @param { ShaderEffect } shaderEffect - ShaderEffect object. If null is passed in, the shader effect will be cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setShaderEffect(shaderEffect: ShaderEffect): void; /** @@ -3571,6 +6677,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a color for this pen. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(color: common2D.Color): void; /** @@ -3588,6 +6703,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a color for this pen. This API provides better performance than setColor and is recommended. + * @param { number } alpha - Alpha channel value of the color in ARGB format. The value is an integer ranging from 0 to 255 + * Any passed-in floating point number is rounded down. + * @param { number } red - Red channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @param { number } green - Green channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @param { number } blue - Blue channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(alpha: number, red: number, green: number, blue: number): void; /** @@ -3596,6 +6727,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Sets a color for this pen. + * @param { number } color - Color in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(color: number): void; /** @@ -3616,6 +6754,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the color of this pen. + * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getColor(): common2D.Color; /** @@ -3633,6 +6778,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the color of this pen. + * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getHexColor(): number; /** @@ -3646,6 +6798,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets the stroke width for this pen. The value 0 is treated as an unusually thin width. During drawing, + * the width of 0 is always drawn as 1 pixel wide, regardless of any scaling applied to the canvas. + * Negative values are also regarded as the value 0 during the drawing process. + * + * @param { number } width - Stroke width. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setStrokeWidth(width: number): void; /** @@ -3654,6 +6818,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the stroke width of this pen. The width describes the thickness of the outline of a shape. + * @returns { number } Stroke width for the pen, in px. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getWidth(): number; /** @@ -3666,6 +6837,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables anti-aliasing for this pen. Anti-aliasing makes the edges of the content smoother. + * If this API is not called, anti-aliasing is disabled by default. + * + * @param { boolean } aa - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setAntiAlias(aa: boolean): void; /** @@ -3674,6 +6856,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether anti-aliasing is enabled for this pen. + * @returns { boolean } Returns true if the anti-aliasing is enabled; returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isAntiAlias(): boolean; /** @@ -3685,6 +6874,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets an alpha value for this pen. + * + * @param { number } alpha - Alpha value. The value is an integer in the range [0, 255]. If a floating point number is passed in, the value is rounded down. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setAlpha(alpha: number): void; /** @@ -3693,6 +6893,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the alpha value of this pen. + * @returns { number } Returns a 8-bit variable that describes the alpha. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getAlpha(): number; /** @@ -3704,6 +6912,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a color filter for this pen. + * + * @param { ColorFilter } filter - Color filter. If null is passed in, the color filter is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setColorFilter(filter: ColorFilter): void; /** * Obtains the color filter of this pen. @@ -3711,6 +6930,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the color filter of this pen. + * @returns { ColorFilter } ColorFilter. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getColorFilter(): ColorFilter; /** * Sets an image filter for this pen. @@ -3718,7 +6944,16 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since 12 + */ + /** + * Sets an image filter for this pen. + * @param { ImageFilter | null } filter - Image filter. If null is passed in, the image filter effect of the pen will be cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 */ setImageFilter(filter: ImageFilter | null): void; /** @@ -3730,6 +6965,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a mask filter for this pen. + * + * @param { MaskFilter } filter - Mask filter. If null is passed in, the mask filter is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setMaskFilter(filter: MaskFilter): void; /** @@ -3741,6 +6986,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the path effect for this pen. + * + * @param { PathEffect } effect - Path effect. If null is passed in, the path filter is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setPathEffect(effect: PathEffect): void; /** @@ -3752,6 +7007,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a shadow layer for this pen. The shadow layer effect takes effect only when text is drawn. + * + * @param { ShadowLayer } shadowLayer - Shadow layer. If null is passed in, the shadow layer is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setShadowLayer(shadowLayer: ShadowLayer): void; /** @@ -3763,6 +7028,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a blend mode for this pen. + * + * @param { BlendMode } mode - Blend mode. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setBlendMode(mode: BlendMode): void; /** @@ -3774,6 +7050,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables dithering for this pen. Dithering make the drawn color more realistic. + * + * @param { boolean } dither - Whether to enable dithering. The value true means to enable dithering, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setDither(dither: boolean): void; /** @@ -3785,6 +7071,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the join style for this pen. If this API is not called, the default join style is MITER_JOIN. + * + * @param { JoinStyle } style - Join style. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setJoinStyle(style: JoinStyle): void; /** @@ -3794,6 +7090,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the join style of this pen. + * + * @returns { JoinStyle } The JoinStyle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getJoinStyle(): JoinStyle; /** @@ -3805,6 +7109,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the cap style for this pen. If this API is not called, the default cap style is FLAT_CAP. + * + * @param { CapStyle } style - Cap style. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setCapStyle(style: CapStyle): void; /** @@ -3814,6 +7128,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the cap style of this pen. + * + * @returns { CapStyle } The CapStyle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getCapStyle(): CapStyle; /** @@ -3821,6 +7143,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Resets this pen to the initial state. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ reset(): void; /** * Obtains the source path outline drawn using this pen and represents it using a destination path. @@ -3833,6 +7162,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the source path outline drawn using this pen and represents it using a destination path. + * + * @param { Path } src - Source path. + * @param { Path } dst - Destination path. + * @returns { boolean } true if the path should be filled, or false if it should be drawn with a hairline (width == 0) + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getFillPath(src: Path, dst: Path): boolean; } @@ -3841,12 +7182,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Defines a brush, which is used to describe the style and color to fill in a shape. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Brush { /** * A constructor used to create a Brush object. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * A constructor used to create a Brush object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(); /** @@ -3857,6 +7212,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Copies a Brush object to create a new one. + * @param { Brush } brush - Indicates the Brush object. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(brush: Brush); /** @@ -3867,6 +7232,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a color for this brush. + * @param { common2D.Color } color - Color in ARGB format. The value of each color channel is an integer ranging from 0 to 255. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(color: common2D.Color): void; /** @@ -3884,6 +7258,22 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a color for this brush. This API provides better performance than setColor and is recommended. + * @param { number } alpha - Alpha channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @param { number } red - Red channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @param { number } green - Green channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @param { number } blue - Blue channel value of the color in ARGB format. The value is an integer ranging from 0 to 255. + * Any passed-in floating point number is rounded down. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(alpha: number, red: number, green: number, blue: number): void; /** @@ -3894,6 +7284,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Sets a color for this brush. + * @param { number } color - Color in hexadecimal ARGB format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setColor(color: number): void; /** @@ -3914,6 +7313,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the color of this brush. + * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getColor(): common2D.Color; /** @@ -3931,6 +7337,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ + /** + * Obtains the color of this brush. + * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getHexColor(): number; /** @@ -3942,6 +7355,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Enables anti-aliasing for this brush. Anti-aliasing makes the edges of the content smoother. + * If this API is not called, anti-aliasing is disabled by default. + * @param { boolean } aa - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, and false means the opposite. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setAntiAlias(aa: boolean): void; /** @@ -3950,6 +7373,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether anti-aliasing is enabled for this brush. + * @returns { boolean } Returns true if anti-aliasing is enabled; returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isAntiAlias(): boolean; /** @@ -3960,6 +7390,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets an alpha value for this brush. + * @param { number } alpha - Alpha value. The value is an integer in the range [0, 255]. If a floating point number is passed in, the value is rounded down. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setAlpha(alpha: number): void; /** @@ -3968,6 +7408,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the alpha value of this brush. + * @returns { number } Returns a 8-bit variable that describes the alpha. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getAlpha(): number; /** @@ -3978,6 +7426,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a color filter for this brush. + * @param { ColorFilter } filter - Color filter. If null is passed in, the color filter is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setColorFilter(filter: ColorFilter): void; /** @@ -3986,6 +7444,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the color filter of this brush. + * @returns { ColorFilter } ColorFilter. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getColorFilter(): ColorFilter; /** * Sets an image filter for this brush. @@ -3995,6 +7460,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets an image filter for this brush. + * @param { ImageFilter | null } filter - Image filter. If null is passed in, the image filter effect of the brush will be cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setImageFilter(filter: ImageFilter | null): void; /** * Adds a mask filter for this brush. @@ -4004,6 +7478,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Adds a mask filter for this brush. + * @param { MaskFilter } filter - Mask filter. If null is passed in, the mask filter is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setMaskFilter(filter: MaskFilter): void; /** @@ -4015,6 +7498,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a shadow layer for this brush. The shadow layer effect takes effect only when text is drawn. + * + * @param { ShadowLayer } shadowLayer - Shadow layer. If null is passed in, the shadow layer is cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setShadowLayer(shadowLayer: ShadowLayer): void; /** @@ -4025,6 +7518,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets the shader effect for this brush. + * @param { ShaderEffect } shaderEffect - ShaderEffect object. If null is passed in, the shader effect will be cleared. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setShaderEffect(shaderEffect: ShaderEffect): void; /** @@ -4035,6 +7537,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ + /** + * Sets a blend mode for this brush. If this API is not called, the default blend mode is SRC_OVER. + * @param { BlendMode } mode - Blend mode. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setBlendMode(mode: BlendMode): void; /** @@ -4042,6 +7554,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Resets this brush to the initial state. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ reset(): void; } @@ -4051,12 +7570,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Implements a matrix. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Matrix { /** * Creates a Matrix object. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Creates a Matrix object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ constructor(); /** @@ -4065,6 +7599,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(matrix: Matrix); @@ -4097,6 +7632,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets this matrix as an identity matrix and rotates it by a given degree around the rotation point (px, py). + * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation, + * and a negative number indicates a counterclockwise rotation. The value is a floating point number. + * @param { number } px - X coordinate of the rotation point. The value is a floating point number. + * @param { number } py - Y coordinate of the rotation point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setRotation(degree: number, px: number, py: number): void; /** @@ -4112,6 +7659,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets this matrix as an identity matrix and scales it with the coefficients (sx, sy) at the scale point (px, py). + * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in, + * the matrix is mirrored around y = px before being scaled. The value is a floating point number. + * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in, + * the matrix is mirrored around x = py before being scaled. The value is a floating point number. + * @param { number } px - X coordinate of the scale point. The value is a floating point number. + * @param { number } py - Y coordinate of the scale point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setScale(sx: number, sy: number, px: number, py: number): void; /** @@ -4125,6 +7686,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets this matrix as an identity matrix and translates it by a given distance (dx, dy). + * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis, + * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number. + * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis, + * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ setTranslation(dx: number, dy: number): void; /** @@ -4168,6 +7742,24 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets parameters for this matrix. + * @param { Array } values - Each value in the array represents the following parameters: + * values[0] - horizontal scale factor to store. + * values[1] - horizontal skew factor to store. + * values[2] - horizontal translation to store. + * values[3] - vertical skew factor to store. + * values[4] - vertical scale factor to store. + * values[5] - vertical translation to store. + * values[6] - input x-axis values perspective factor to store. + * values[7] - input y-axis values perspective factor to store. + * values[8] - perspective scale factor to store. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setMatrix(values: Array): void; /** @@ -4206,6 +7798,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Preconcats the existing matrix with the passed-in matrix. + * @param { Matrix } matrix - Matrix object, which is on the right of a multiplication expression. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ preConcat(matrix: Matrix): void; /** @@ -4217,6 +7818,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether this matrix is equal to another matrix. + * @param { Matrix } matrix - Matrix to compare. + * @returns { Boolean } Returns true if the two matrices are equal; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isEqual(matrix: Matrix): Boolean; /** @@ -4229,6 +7840,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Inverts this matrix and returns the result. + * @param { Matrix } matrix - Matrix object used to store the inverted matrix. + * @returns { Boolean } Check result. The value true means that the matrix is revertible and the matrix object is set to its inverse, + * and false means that the matrix is not revertible and the matrix object remains unchanged. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ invert(matrix: Matrix): Boolean; /** @@ -4237,6 +7859,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether this matrix is an identity matrix. + * @returns { Boolean } Returns true if matrix is identity; returns false otherwise. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isIdentity(): Boolean; /** @@ -4248,6 +7877,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains the value of a given index in this matrix. The index ranges from 0 to 8. + * @param { number } index - Index. The value is an integer ranging from 0 to 8. + * @returns { number } Returns value corresponding to index.Returns 0 if out of range. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ getValue(index: number): number; /** * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a @@ -4261,6 +7901,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a + * given degree around the rotation point (px, py). + * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation, + * and a negative number indicates a counterclockwise rotation. The value is a floating point number. + * @param { number } px - X coordinate of the rotation point. The value is a floating point number. + * @param { number } py - Y coordinate of the rotation point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ postRotate(degree: number, px: number, py: number): void; /** * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been @@ -4276,6 +7929,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been + * scaled with the coefficient (sx, sy) at the scale point (px, py). + * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in, + * the matrix is mirrored around y = px before being scaled. The value is a floating point number. + * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in, + * the matrix is mirrored around x = py before being scaled. The value is a floating point number. + * @param { number } px - X coordinate of the scale point. The value is a floating point number. + * @param { number } py - Y coordinate of the scale point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ postScale(sx: number, sy: number, px: number, py: number): void; /** * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). @@ -4288,6 +7956,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Post multiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). + * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis, + * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number. + * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis, + * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ postTranslate(dx: number, dy: number): void; /** @@ -4302,6 +7982,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been rotated by a + * given degree around the rotation point (px, py). + * @param { number } degree - Angle to rotate, in degrees. A positive number indicates a clockwise rotation, + * and a negative number indicates a counterclockwise rotation. The value is a floating point number. + * @param { number } px - X coordinate of the rotation point. The value is a floating point number. + * @param { number } py - Y coordinate of the rotation point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ preRotate(degree: number, px: number, py: number): void; /** @@ -4331,6 +8024,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been scaled with the + * coefficient (sx, sy) at the scale point (px, py). + * @param { number } sx - Scale coefficient along the X axis. If a negative number is passed in, + * the matrix is mirrored around y = px before being scaled. The value is a floating point number. + * @param { number } sy - Scale coefficient along the Y axis. If a negative number is passed in, + * the matrix is mirrored around x = py before being scaled. The value is a floating point number. + * @param { number } px - X coordinate of the scale point. The value is a floating point number. + * @param { number } py - Y coordinate of the scale point. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ preScale(sx: number, sy: number, px: number, py: number): void; /** * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). @@ -4343,6 +8051,18 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Premultiplies this matrix by a matrix that is derived from an identity matrix after it has been translated by a given distance (dx, dy). + * @param { number } dx - Horizontal distance to translate. A positive number indicates a translation towards the positive direction of the X axis, + * and a negative number indicates a translation towards the negative direction of the X axis. The value is a floating point number. + * @param { number } dy - Vertical distance to translate. A positive number indicates a translation towards the positive direction of the Y axis, + * and a negative number indicates a translation towards the negative direction of the Y axis. The value is a floating point number. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ preTranslate(dx: number, dy: number): void; /** @@ -4362,6 +8082,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Resets this matrix to an identity matrix. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ reset(): void; /** * Maps a source point array to a destination point array by means of matrix transformation. @@ -4372,6 +8099,16 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Maps a source point array to a destination point array by means of matrix transformation. + * @param { Array } src - Array of source points. + * @returns { Array } Return mapped points array. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ mapPoints(src: Array): Array; /** @@ -4391,6 +8128,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Obtains all element values of this matrix. + * @returns { Array } nine scalar values contained by Matrix. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ getAll(): Array; /** * Sets the destination rectangle to the bounding rectangle of the shape obtained after transforming the source rectangle @@ -4400,13 +8144,42 @@ declare namespace drawing { * To address this issue, a destination rectangle (black rectangle) is defined as the bounding rectangle. * @param { common2D.Rect } dst - Rectangle object, which is used to store the bounding rectangle. * @param { common2D.Rect } src - Source rectangle. - * @returns { boolean } Returns true if the mapped src is equal to the dst; returns false is not equal. + * @returns { boolean } Returns true if the mapped src is equal to the dst; returns false is not equal. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ + /** + * ets the destination rectangle to the bounding rectangle of the shape obtained after transforming the source rectangle + * with a matrix transformation. As shown in the figure below, the blue rectangle represents the source rectangle, + * and the yellow rectangle is the shape obtained after a matrix transformation is applied to the source rectangle. + * Since the edges of the yellow rectangle are not aligned with the coordinate axes, it cannot be represented by a rectangle object. + * To address this issue, a destination rectangle (black rectangle) is defined as the bounding rectangle. + * @param { common2D.Rect } dst - Rectangle object, which is used to store the bounding rectangle. + * @param { common2D.Rect } src - Source rectangle. + * @returns { boolean } Returns true if the mapped src is equal to the dst; returns false is not equal. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + mapRect(dst: common2D.Rect, src: common2D.Rect): boolean; + /** + * Sets this matrix to a transformation matrix that maps a source rectangle to a destination rectangle. + * @param { common2D.Rect } src - Source rectangle. + * @param { common2D.Rect } dst - Destination rectangle. + * @param { ScaleToFit } scaleToFit - Mapping mode from the source rectangle to the target rectangle. + * @returns { boolean } Check result. The value true means that the matrix can represent the mapping, and false means the opposite. + * If either the width or the height of the source rectangle is less than or equal to 0, the API returns false + * and sets the matrix to an identity matrix. If either the width or height of the destination rectangle is less than or equal to 0, + * the API returns true and sets the matrix to a matrix with all values 0, except for a perspective scaling coefficient of 1. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - mapRect(dst: common2D.Rect, src: common2D.Rect): boolean; /** * Sets this matrix to a transformation matrix that maps a source rectangle to a destination rectangle. * @param { common2D.Rect } src - Source rectangle. @@ -4419,7 +8192,8 @@ declare namespace drawing { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 */ setRectToRect(src: common2D.Rect, dst: common2D.Rect, scaleToFit: ScaleToFit): boolean; /** @@ -4434,6 +8208,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets this matrix to a transformation matrix that maps the source point array to the destination point array. + * Both the number of source points and that of destination points must be in the range [0, 4]. + * @param { Array } src - Array of source points. The array length must be the same as the value of count. + * @param { Array } dst - Array of destination points. The array length must be the same as the value of count. + * @param { number } count - Number of points in each array. The value is an integer. + * @returns { boolean } Returns true if Matrix was constructed successfully + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setPolyToPoly(src: Array, dst: Array, count: number): boolean; } @@ -4443,12 +8230,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the modes of scaling a source rectangle into a destination rectangle. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum ScaleToFit { /** * Scales the source rectangle to completely fill the destination rectangle, potentially changing the aspect ratio of the source rectangle. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Scales the source rectangle to completely fill the destination rectangle, potentially changing the aspect ratio of the source rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ FILL_SCALE_TO_FIT = 0, /** @@ -4456,6 +8256,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Scales the source rectangle, preserving its aspect ratio, to align it to the upper left corner of the destination rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ START_SCALE_TO_FIT = 1, /** @@ -4463,6 +8269,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Scales the source rectangle, preserving its aspect ratio, to align it to the center of the destination rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ CENTER_SCALE_TO_FIT = 2, /** @@ -4470,6 +8282,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Scales the source rectangle, preserving its aspect ratio, to align it to the lower right corner of the destination rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ END_SCALE_TO_FIT = 3 } @@ -4478,12 +8296,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Describes a region, which is used to describe the region where the shape can be drawn. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ class Region { /** * Creates an empty region. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(); @@ -4493,6 +8319,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(region: Region); @@ -4505,6 +8332,7 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ constructor(left: number, top: number, right: number, bottom: number); @@ -4565,6 +8393,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether a point is contained in this region. + * @param { number } x - X coordinate of the point. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } y - Y coordinate of the point. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @returns { boolean } Returns true if (x, y) is inside region; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isPointContained(x: number, y:number): boolean; /** @@ -4577,6 +8416,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether another region is contained in this region. + * @param { Region } other - Region object. + * @returns { boolean } Returns true if other region is completely inside the region object; + *
returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ isRegionContained(other: Region): boolean; /** @@ -4589,6 +8439,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Performs an operation on this region and another region, and stores the resulting region in this Region object. + * @param { Region } region - Region object. + * @param { RegionOp } regionOp - Operation mode of the region. + * @returns { boolean } Returns true if replaced region is not empty; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ op(region: Region, regionOp: RegionOp): boolean; /** @@ -4614,6 +8475,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Checks whether a rectangle do not intersect with this region. Actually, + * this API determines whether the rectangle does not intersect with the bounding rectangle of the region, and therefore the result may not be accurate. + * @param { number } left - Left position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } top - Top position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } right - Right position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } bottom - Bottom position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @returns { boolean } Returns true if rect and region is not intersect; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ quickReject(left: number, top: number, right: number, bottom: number): boolean; /** @@ -4637,6 +8512,17 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a region that matches the outline of a path within the cropping area. + * @param { Path } path - Path object. + * @param { Region } clip - Region object. + * @returns { boolean } Returns true if constructed region is not empty; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setPath(path: Path, clip: Region): boolean; /** @@ -4651,6 +8537,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Sets a rectangle. + * @param { number } left - Left position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } top - Top position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } right - Right position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @param { number } bottom - Bottom position of the rectangle. The value must be an integer. If a decimal is passed in, the decimal part is rounded off. + * @returns { boolean } Returns true if constructed region is not empty; returns false otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ setRect(left: number, top: number, right: number, bottom: number): boolean; /** @@ -4677,12 +8576,27 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the operations for combining two regions. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ enum RegionOp { /** * Difference operation. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Difference operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ DIFFERENCE = 0, /** @@ -4690,6 +8604,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Intersect operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ INTERSECT = 1, /** @@ -4697,6 +8618,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Union operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ UNION = 2, /** @@ -4704,6 +8632,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Xor operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ XOR = 3, /** @@ -4711,6 +8646,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Reverse difference operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ REVERSE_DIFFERENCE = 4, /** @@ -4718,6 +8660,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Replace operation. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ REPLACE = 5 } @@ -4728,12 +8677,26 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the corner positions of a rounded rectangle. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum CornerPos { /** * Top left corner of the rounded rectangle. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Top left corner of the rounded rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TOP_LEFT_POS = 0, /** @@ -4741,6 +8704,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Top right corner of the rounded rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ TOP_RIGHT_POS = 1, /** @@ -4748,6 +8717,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Bottom right corner of the rounded rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ BOTTOM_RIGHT_POS = 2, /** @@ -4755,6 +8730,12 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Bottom left corner of the rounded rectangle. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ BOTTOM_LEFT_POS = 3 } @@ -4766,6 +8747,15 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * Enumerates the constraints on the source rectangle. + * It is used to specify whether to limit the sampling range within the source rectangle when drawing an image on a canvas. + * + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ enum SrcRectConstraint { /** @@ -4774,6 +8764,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The sampling range is strictly confined to the source rectangle, resulting in a slow sampling speed. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ STRICT = 0, /** @@ -4782,6 +8779,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ + /** + * The sampling range is not limited to the source rectangle and can extend beyond it, allowing for a high sampling speed. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ FAST = 1 } @@ -4791,6 +8795,13 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 15 */ + /** + * A utility class that provides only static methods to convert data structs defined in other modules and common2D. + * + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ class Tool { /** * Converts a color value of the ResourceColor type to a common2D.Color object. @@ -4804,6 +8815,19 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 15 */ + /** + * Converts a color value of the ResourceColor type to a common2D.Color object. + * @param { ResourceColor } resourceColor - Color value of the ResourceColor type. (All four types of inputs are supported. + * The following provides 13 example inputs.) The fourth type of Resource supports only the construction method $r('belonging.type.name'). + * Ensure that the resource has been defined in the main/resources/base/element directory. (The types color, string, + * and integer are available for the belonging app, whereas only the type color is available for the belonging sys.) + * @returns { common2D.Color } Returns a 32-bit (ARGB) variable that describes the color. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ static makeColorFromResourceColor(resourceColor: ResourceColor): common2D.Color; } @@ -5001,7 +9025,8 @@ declare namespace drawing { * Checks if the 2D rectangular object is empty. * * @param { common2D.Rect } rect - Indicates the Rect object. - * @returns { boolean } - Returns true if the rectangle is empty (left >= right or top >= bottom); returns false otherwise. + * @returns { boolean } - Returns true if the rectangle is empty (left >= right or top >= bottom); + * returns false otherwise. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform @@ -5090,7 +9115,8 @@ declare namespace drawing { * * @param { common2D.Rect } rect - Indicates the Rect object. * @param { common2D.Rect } other - Indicates the other Rect object for comparison. - * @returns { boolean } Returns true if left, top, right and bottom of rect and other are equal; returns false otherwise. + * @returns { boolean } Returns true if left, top, right and bottom of rect and other are equal; + * returns false otherwise. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform diff --git a/api/@ohos.graphics.hdrCapability.d.ts b/api/@ohos.graphics.hdrCapability.d.ts index 6b261e4f2b5d59a710fcfb81a60517f1a895cfbc..dc1c0a4c126ce6cec1cd81f24f9b8c664de92a0c 100644 --- a/api/@ohos.graphics.hdrCapability.d.ts +++ b/api/@ohos.graphics.hdrCapability.d.ts @@ -35,6 +35,7 @@ import { AsyncCallback } from './@ohos.base'; * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hdrCapability { /** @@ -50,7 +51,8 @@ declare namespace hdrCapability { * @enum { number } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum HDRFormat { /** @@ -65,6 +67,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** @@ -79,6 +82,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_HLG = 1, /** @@ -93,6 +97,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_HDR10 = 2, /** @@ -107,6 +112,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_HDR_VIVID = 3, /** @@ -121,6 +127,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_HDR_VIVID_DUAL = 4, /** @@ -135,6 +142,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_HDR_VIVID_SINGLE = 5, /** @@ -149,6 +157,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_HDR_ISO_DUAL = 6, /** @@ -163,6 +172,7 @@ declare namespace hdrCapability { * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_HDR_ISO_SINGLE = 7, } diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index cbf875404c4960cf915e1bb1fc4dfd517fbfdc12..bbe8e55b089a3bf9052052204f9f8ade3a60ed6d 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -19,6 +19,9 @@ */ import type drawing from './@ohos.graphics.drawing'; import type common2D from './@ohos.graphics.common2D'; +/*** if arkts 1.2 */ +import { Resource } from './global/resource'; +/*** endif */ /** * The Text module provides a set of APIs for text layout and font management. @@ -41,7 +44,8 @@ import type common2D from './@ohos.graphics.common2D'; * * @namespace text * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace text { @@ -49,27 +53,31 @@ declare namespace text { * Refers to how to align the horizontal position of text when displaying text. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextAlign { /** * Use the left side of the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 0, /** * Use the right side of the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 1, /** * Use the midpoint line the text as a reference line for alignment. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 2, @@ -77,21 +85,24 @@ declare namespace text { * Justified, which means that each line (except the last line) is stretched so that every line has equal width, * and the left and right margins are straight. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ JUSTIFY = 3, /** * Align text from start, based on the TextDirection, such as left-to-right or right-to-left. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START = 4, /** * Align text from end, based on the TextDirection, such as left-to-right or right-to-left, opposite to START. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END = 5, } @@ -133,20 +144,23 @@ declare namespace text { * Enumerate text runs direction. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextDirection { /** * The text is oriented from right to left. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RTL, /** * The text is oriented from left to right. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LTR, } @@ -155,27 +169,31 @@ declare namespace text { * Enumerate text segmentation strategy. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum BreakStrategy { /** * Fills the current line as much as possible without adding hyphens. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GREEDY, /** * Optimizes layout and may add hyphens when necessary. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_QUALITY, /** * Ensures consistent line width in a paragraph, adding hyphens if needed. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BALANCED, } @@ -184,13 +202,15 @@ declare namespace text { * Enumerate word break strategy. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum WordBreak { /** * Default mode that break words based on language-specific conventions. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL, @@ -199,7 +219,8 @@ declare namespace text { * This value is suitable for Asian text that contains some non-Asian text. For example, * it can be used to break consecutive English characters. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_ALL, @@ -208,7 +229,8 @@ declare namespace text { * or other natural breakpoints to keep words intact. If no breakpoints are found, it breaks between * any two characters. For CJK text, this behaves like NORMAL. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_WORD, @@ -216,7 +238,8 @@ declare namespace text { * Attempts to break words at the end of a line using a hyphen. If a hyphen cannot be added, * it behaves like BREAK_WORD. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BREAK_HYPHEN, } @@ -225,14 +248,16 @@ declare namespace text { * Describes a text decoration. * @typedef Decoration * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Decoration { /** * Type of the decoration. The default value is NONE. * @type { ?TextDecorationType } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textDecoration?: TextDecorationType; @@ -240,7 +265,8 @@ declare namespace text { * Color of the decoration. The default value is transparent. * @type { ?common2D.Color } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: common2D.Color; @@ -248,7 +274,8 @@ declare namespace text { * Style of the decoration. The default value is SOLID. * @type { ?TextDecorationStyle } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decorationStyle?: TextDecorationStyle; @@ -257,7 +284,8 @@ declare namespace text { * The default value is 1.0. * @type { ?number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decorationThicknessScale?: number; } @@ -266,34 +294,39 @@ declare namespace text { * Enumerates the text decoration types. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextDecorationType { /** * There are no text decoration. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE, /** * There is a decoration line below the text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNDERLINE, /** * There is a decoration line above the text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OVERLINE, /** * There is a decoration line through the middle of the text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LINE_THROUGH, } @@ -302,41 +335,47 @@ declare namespace text { * Enumerates the text decoration styles. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextDecorationStyle { /** * Decoration line is solid line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOLID, /** * Decoration line is double line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOUBLE, /** * Decoration line is dotted line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOTTED, /** * Decoration line is dashed line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DASHED, /** * Decoration line is wavy line. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WAVY, } @@ -345,69 +384,79 @@ declare namespace text { * Enumeration of font weight of text. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum FontWeight { /** * Thin * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W100, /** * Extra-light * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W200, /** * Light * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W300, /** * Normal/Regular * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W400, /** * Medium * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W500, /** * Semi-bold * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W600, /** * Bold * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W700, /** * Extra-bold * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W800, /** * Black * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ W900, } @@ -416,27 +465,31 @@ declare namespace text { * Enumeration of font style of text. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum FontStyle { /** * Upright font type. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL, /** * Slant font. If no italic version is available for the current font, the oblique version will be used instead. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ITALIC, /** * Oblique font. If no oblique version is available for the current font, the italic version will be used instead. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OBLIQUE, } @@ -445,69 +498,79 @@ declare namespace text { * Enumeration of font width of text. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum FontWidth { /** * Ultra condensed font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ULTRA_CONDENSED = 1, /** * Extra condensed font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXTRA_CONDENSED = 2, /** * Condensed font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONDENSED = 3, /** * Semi condensed font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEMI_CONDENSED = 4, /** * Normal font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 5, /** * Semi expanded font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEMI_EXPANDED = 6, /** * Expanded font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPANDED = 7, /** * Extra expanded font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXTRA_EXPANDED = 8, /** * Ultra expanded font width. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ULTRA_EXPANDED = 9, } @@ -516,34 +579,39 @@ declare namespace text { * Enumerates the text height modifier patterns. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextHeightBehavior { /** * Allows the first line of the paragraph to rise and the last line to drop. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALL = 0x0, /** * Prevents the first line of a paragraph from rising. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_FIRST_ASCENT = 0x1, /** * Prevents the last line of a paragraph from dropping. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_LAST_ASCENT = 0x2, /** * Combines the effects of disabling the first line from rising and the last line from dropping. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_ALL = 0x1 | 0x2, } @@ -552,14 +620,16 @@ declare namespace text { * Enumeration the type of text baseline. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TextBaseline { /** * The alphabetic baseline, typically used for Latin-based scripts where the baseline aligns * with the base of lowercase letters. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALPHABETIC, @@ -567,7 +637,8 @@ declare namespace text { * The ideographic baseline, commonly used for ideographic scripts such as Chinese, Japanese, and Korean, * where the baseline aligns with the center of characters. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IDEOGRAPHIC, } @@ -577,27 +648,31 @@ declare namespace text { * EllipsisMode.START and EllipsisMode.MIDDLE take effect only when text overflows in a single line. * @enum { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum EllipsisMode { /** * Places the ellipsis in the text header. It is valid only when maxLines is set to 1 in ParagraphStyle. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ START, /** * Places the ellipsis in the middle of the text. It is valid only when maxLines is set to 1 in ParagraphStyle. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MIDDLE, /** * Places the ellipsis at the end of the text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ END, } @@ -606,14 +681,16 @@ declare namespace text { * Describes shadow of text. * @typedef TextShadow * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextShadow { /** * Color of the text shadow. The default value is black (255, 0, 0, 0). * @type { ?common2D.Color } The color of text shadow * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: common2D.Color; /** @@ -621,7 +698,8 @@ declare namespace text { * The horizontal and vertical coordinates must be greater than or equal to 0. * @type { ?common2D.Point } The point of shadow * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ point?: common2D.Point; /** @@ -629,7 +707,8 @@ declare namespace text { * The value is a floating point number. The default value is 0.0px. * @type { ?number } The value about radius of blur, it type is "double" * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ blurRadius?: number; } @@ -638,14 +717,16 @@ declare namespace text { * Describes the style of a rectangle. * @typedef RectStyle * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RectStyle { /** * Color of the rectangle. * @type { common2D.Color } The color of rect style * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color: common2D.Color; @@ -653,7 +734,8 @@ declare namespace text { * Left top radius of the rectangle. * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leftTopRadius: number; @@ -661,7 +743,8 @@ declare namespace text { * Right top radius of the rectangle. * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rightTopRadius: number; @@ -669,7 +752,8 @@ declare namespace text { * Right bottom radius of the rectangle. * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rightBottomRadius: number; @@ -677,30 +761,59 @@ declare namespace text { * Left bottom radius of the rectangle. * @type { number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leftBottomRadius: number; } + /** + * Enumerates line height scaling type. + * @enum { number } + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + enum LineHeightStyle { + /** + * Use the font size as the scale factor for line height scaling. + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + FONT_SIZE = 0, + + /** + * Use the text height after shaping as the scale factor for line height scaling. + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + FONT_HEIGHT = 1 + } + /** * Describes font feature of text. * @typedef FontFeature * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FontFeature { /** * String identified by the keyword in the font feature key-value pair. * @type { string } feature name * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** * Value in the font feature key-value pair. * @type { number } feature value * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: number; } @@ -709,21 +822,24 @@ declare namespace text { * Describes font variation of text. * @typedef FontVariation * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface FontVariation { /** * String identified by the keyword in the font variation key-value pair. * @type { string } variation axis * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ axis: string; /** * Value in the font variation key-value pair. * @type { number } variation value * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: number; } @@ -759,7 +875,8 @@ declare namespace text { * Describes text style. * @typedef TextStyle * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextStyle { @@ -767,7 +884,8 @@ declare namespace text { * Text decoration. By default, no decoration is used. * @type { ?Decoration } decoration for text * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ decoration?: Decoration; @@ -775,7 +893,8 @@ declare namespace text { * Text color. The default color is white. * @type { ?common2D.Color } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ color?: common2D.Color; @@ -785,7 +904,8 @@ declare namespace text { * If the weight is greater than or equal to semi-bold, it might result in a fake bold effect. * @type { ?FontWeight } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: FontWeight; @@ -793,7 +913,8 @@ declare namespace text { * Font style. The default value is NORMAL. * @type { ?FontStyle } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -801,7 +922,8 @@ declare namespace text { * Text baseline type. The default value is ALPHABETIC. * @type { ?TextBaseline } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baseline?: TextBaseline; @@ -809,7 +931,8 @@ declare namespace text { * Array of font families. By default, the array is empty, indicating that all system fonts are matched. * @type { ?Array } fontfamily gather * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamilies?: Array; @@ -817,7 +940,8 @@ declare namespace text { * Font size, in units of px. The value is a floating point number. The default value is 14.0. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: number; @@ -827,7 +951,8 @@ declare namespace text { * and a negative value bring characters closer together. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number; @@ -835,16 +960,45 @@ declare namespace text { * Word spacing, in units of px. The value is a floating point number. The default value is 0.0. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordSpacing?: number; + /** + * Maximum line height. The value is a double number. + * @type { ?double } it is double type data + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + lineHeightMaximum?: double; + + /** + * Minimum line height. The value is a double number. + * @type { ?double } it is double type data + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + lineHeightMinimum?: double; + + /** + * Line height scaling base style. The default value is FONT_SIZE. + * @type { ?LineHeightStyle } Line height scaling style. + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + lineHeightStyle?: LineHeightStyle; + /** * Scale factor of the line height. The value is a floating point number. * The default value is 1.0. This parameter is valid only when heightOnly is set to true. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightScale?: number; @@ -854,7 +1008,8 @@ declare namespace text { * The value true means that half leading is enabled, and false means the opposite. The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; @@ -864,7 +1019,8 @@ declare namespace text { * and false means that the height is set based on the line height and line spacing. The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightOnly?: boolean; @@ -872,7 +1028,8 @@ declare namespace text { * Ellipsis content, which will be used to replace the extra content. * @type { ?string } it is u16string type data. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsis?: string; @@ -880,7 +1037,8 @@ declare namespace text { * Ellipsis type. The default value is END, indicating that the ellipsis is at the end of a line. * @type { ?EllipsisMode } Ellipsis mode. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ellipsisMode?: EllipsisMode; @@ -889,7 +1047,8 @@ declare namespace text { * and 'zh-Hant' indicates Traditional Chinese. For details, see ISO 639-1. The default value is an empty string. * @type { ?string } it is string type data. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ locale?: string; @@ -897,7 +1056,8 @@ declare namespace text { * Shift of the baseline. The value is a floating point number. The default value is 0.0px. * @type { ?number } it is double type data. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baselineShift?: number; @@ -905,7 +1065,8 @@ declare namespace text { * Text Style available font features. * @type { ?Array } A collection of font features. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFeatures?: Array; @@ -913,7 +1074,8 @@ declare namespace text { * Text shadows of text. * @type { ?Array } textShadow gather. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textShadows?: Array; @@ -921,7 +1083,8 @@ declare namespace text { * Rectangle style of text. * @type { ?RectStyle } rect style for text. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ backgroundRect?: RectStyle; @@ -929,7 +1092,8 @@ declare namespace text { * Text Style available font variations. * @type { ?Array } A collection of font variations. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontVariations?: Array; @@ -940,19 +1104,30 @@ declare namespace text { * @since 20 */ badgeType?: TextBadgeType; + + /** + * Font width. The default value is NORMAL. + * @type { ?FontWidth } it is uint32_t type data + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + fontWidth?: FontWidth; } /** * Implements a collection of fonts. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class FontCollection { /** * Get global FontCollection instance of the application. * @returns { FontCollection } The FontCollection object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getGlobalInstance(): FontCollection; @@ -964,7 +1139,8 @@ declare namespace text { * @param { string | Resource } path - Path of the font file to import. The value must be * **file://**absolute path of the font file or **rawfile/**directory or file name. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loadFontSync(name: string, path: string | Resource): void; @@ -979,7 +1155,8 @@ declare namespace text { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ loadFont(name: string, path: string | Resource): Promise; @@ -1019,7 +1196,8 @@ declare namespace text { * The font cache has a memory limit and a clearing mechanism. It occupies limited memory. * You are not advised to clear it unless otherwise required. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearCaches(): void; } @@ -1029,14 +1207,16 @@ declare namespace text { * and other properties related to the line height when drawing texts. The strut style is disabled by default. * @typedef StrutStyle * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface StrutStyle { /** * List of font families. By default, the list corresponds to the system's default fonts. * @type { ?Array } fontfamily gather * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamilies?: Array; @@ -1044,7 +1224,8 @@ declare namespace text { * Font style. The default value is NORMAL. * @type { ?FontStyle } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: FontStyle; @@ -1052,7 +1233,8 @@ declare namespace text { * Font width. The default value is NORMAL. * @type { ?FontWidth } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWidth?: FontWidth; @@ -1062,7 +1244,8 @@ declare namespace text { * If the weight is greater than or equal to W600, it might result in a fake bold effect. * @type { ?FontWeight } it is uint32_t type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: FontWeight; @@ -1070,7 +1253,8 @@ declare namespace text { * Font size, in units of px. The value is a floating point number. The default value is 14.0. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: number; @@ -1078,7 +1262,8 @@ declare namespace text { * Scale factor of the line height. The value is a floating point number. The default value is 1.0. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height?: number; @@ -1086,7 +1271,8 @@ declare namespace text { * Custom leading to be applied to the strut. The value is a floating point number. The default value is -1.0. * @type { ?number } it is double type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ leading?: number; @@ -1095,7 +1281,8 @@ declare namespace text { * for all lines, and false means the opposite. The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ forceHeight?: boolean; @@ -1104,7 +1291,8 @@ declare namespace text { * The value true means to enable the strut style, and false means the opposite. The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled?: boolean; @@ -1113,7 +1301,8 @@ declare namespace text { * The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ heightOverride?: boolean; @@ -1123,7 +1312,8 @@ declare namespace text { * The value true means that half leading is enabled, and false means the opposite. The default value is false. * @type { ?boolean } it is boolean type data * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ halfLeading?: boolean; } @@ -1132,14 +1322,16 @@ declare namespace text { * Determines the configuration used by ParagraphBuilder to position lines within a Paragraph of text. * @typedef ParagraphStyle * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ParagraphStyle { /** * Text style applied to the paragraph. The default value is the initial text style. * @type { ?TextStyle } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle?: TextStyle; @@ -1147,7 +1339,8 @@ declare namespace text { * Text direction. The default value is LTR. * @type { ?TextDirection } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textDirection?: TextDirection; @@ -1155,7 +1348,8 @@ declare namespace text { * Text alignment mode. The default value is START. This parameter is invalid when the tab parameter is configured. * @type { ?TextAlign } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ align?: TextAlign; @@ -1163,7 +1357,8 @@ declare namespace text { * Word break type. The default value is BREAK_WORD. * @type { ?WordBreak } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; @@ -1171,7 +1366,8 @@ declare namespace text { * Maximum number of lines. The value is an integer. The default value is 1e9. * @type { ?number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines?: number; @@ -1179,7 +1375,8 @@ declare namespace text { * Text break strategy. The default value is GREEDY. * @type { ?BreakStrategy } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ breakStrategy?: BreakStrategy; @@ -1187,7 +1384,8 @@ declare namespace text { * Strut style. The default value is the initial StrutStyle object. * @type { ?StrutStyle } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ strutStyle?: StrutStyle; @@ -1195,7 +1393,8 @@ declare namespace text { * Text height modifier pattern. The default value is ALL. * @type { ?TextHeightBehavior } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textHeightBehavior?: TextHeightBehavior; @@ -1205,7 +1404,8 @@ declare namespace text { * the ellipsis parameter in TextStyle. * @type { ?TextTab } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ tab?: TextTab; @@ -1232,6 +1432,15 @@ declare namespace text { * @since 20 */ verticalAlign?: TextVerticalAlign; + + /** + * Line spacing. The value is a double number. + * @type { ?double } It is double type data + * @syscap SystemCapability.Graphics.Drawing + * @since 21 + * @arkts 1.1&1.2 + */ + lineSpacing?: double; } /** @@ -1507,14 +1716,16 @@ declare namespace text { * Before calling any of the following APIs, you must use build() of the ParagraphBuilder class to * create a Paragraph object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class Paragraph { /** * Performs layout and calculates the positions of all glyphs. * @param { number } width - Maximum width of a single line, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ layoutSync(width: number): void; @@ -1535,7 +1746,8 @@ declare namespace text { * @param { number } x - X coordinate of the upper left corner. The value is a floating point number. * @param { number } y - Y coordinate of the upper left corner. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paint(canvas: drawing.Canvas, x: number, y: number): void; @@ -1549,7 +1761,8 @@ declare namespace text { * @param { number } vOffset - Vertical offset along the path direction. A positive number indicates a position * on the left side of the path, and a negative number indicates a position on the right side of the path. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: number, vOffset: number): void; @@ -1573,7 +1786,8 @@ declare namespace text { * Obtains the longest line in the text. * @returns { number } Longest line, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLongestLine(): number; @@ -1718,7 +1932,8 @@ declare namespace text { * Obtains an array of line measurement information. * @returns { Array } Array of line measurement information. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLineMetrics(): Array; @@ -1729,7 +1944,8 @@ declare namespace text { * line number is valid and the measurement information exists. If the line number is invalid or * the measurement information cannot be obtained, undefined is returned. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLineMetrics(lineNumber: number): LineMetrics | undefined; @@ -1936,7 +2152,8 @@ declare namespace text { /** * Builds a Paragraph containing text with the given styling information. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class ParagraphBuilder { /** @@ -1944,7 +2161,8 @@ declare namespace text { * @param { ParagraphStyle } paragraphStyle - Paragraph style {@link ParagraphStyle} * @param { FontCollection } fontCollection - Font collection {@link FontCollection} * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(paragraphStyle: ParagraphStyle, fontCollection: FontCollection); @@ -1956,14 +2174,16 @@ declare namespace text { * font size, color, font weight, word spacing, line spacing, decoration (such as underline and strikethrough), * and text shadow. {@link TextStyle} * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pushStyle(textStyle: TextStyle): void; /** * Restores the previous text style. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ popStyle(): void; @@ -1972,7 +2192,8 @@ declare namespace text { * @param { string } text - Exact text string inserted into the paragraph. If an invalid Unicode character is * provided, it is displayed as �. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addText(text: string): void; @@ -1989,7 +2210,8 @@ declare namespace text { * Creates a paragraph object that can be used for subsequent layout and rendering. * @returns { Paragraph } Paragraph object that can be used for subsequent rendering. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ build(): Paragraph; @@ -2352,14 +2574,16 @@ declare namespace text { * Describes the layout information and metrics for a continuous piece of text (a run) in a line of text. * @typedef RunMetrics * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface RunMetrics { /** * The metrics of an Font. * @type { TextStyle } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textStyle: TextStyle; @@ -2367,7 +2591,8 @@ declare namespace text { * Describes text style. * @type { drawing.FontMetrics } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontMetrics: drawing.FontMetrics; } @@ -2376,14 +2601,16 @@ declare namespace text { * Describes the measurement information of a single line of text in the text layout. * @typedef LineMetrics * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LineMetrics { /** * Start index of the line in the text buffer. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startIndex: number; @@ -2391,7 +2618,8 @@ declare namespace text { * End index of the line in the text buffer. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ endIndex: number; @@ -2399,7 +2627,8 @@ declare namespace text { * Ascent, that is, the distance from the baseline to the top of the character. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ascent: number; @@ -2407,7 +2636,8 @@ declare namespace text { * Descent, that is, the distance from the baseline to the bottom of the character. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ descent: number; @@ -2415,7 +2645,8 @@ declare namespace text { * Height of the line, which is Math.round(ascent + descent). * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ height: number; @@ -2423,7 +2654,8 @@ declare namespace text { * Width of the line. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ width: number; @@ -2431,7 +2663,8 @@ declare namespace text { * Left edge of the line. The right edge is the value of left plus the value of width. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ left: number; @@ -2439,7 +2672,8 @@ declare namespace text { * Y coordinate of the baseline in the line relative to the top of the paragraph. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baseline: number; @@ -2447,7 +2681,8 @@ declare namespace text { * Line number, starting from 0. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineNumber: number; @@ -2455,7 +2690,8 @@ declare namespace text { * Height from the top to the current line. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ topHeight: number; @@ -2465,7 +2701,8 @@ declare namespace text { * are before layout and are the base values we calculate from. * @type { Map } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ runMetrics: Map; } @@ -2515,7 +2752,8 @@ declare namespace text { * Implements a paragraph-style text tab, which stores the alignment mode and position. * @typedef TextTab * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface TextTab { /** @@ -2524,16 +2762,18 @@ declare namespace text { * alignment. * @type { TextAlign } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ alignment: TextAlign; - + /** * Alignment position of the text following the tab character. The value is a floating point number, in px. * The minimum value is 1.0. When the value is less than 1.0, the tab character is replaced with a space. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ location: number; } diff --git a/api/@ohos.graphics.uiEffect.d.ts b/api/@ohos.graphics.uiEffect.d.ts index 929fbdc1dbde733fbc6ded31ea5204e6fe17dbeb..e18dc811a6ab15276cd758b5405a244339cb52db 100644 --- a/api/@ohos.graphics.uiEffect.d.ts +++ b/api/@ohos.graphics.uiEffect.d.ts @@ -111,16 +111,16 @@ declare namespace uiEffect { /** * Adds the content radius gradient blurring effect for the current component. The input parameter is the blurring radius. * - * @param { number } value - the blurring radius. + * @param { number } radius - the blurring radius. * The larger the blurring radius, the more blurring the content, and if the value is 0, the content blurring effect is not blurring. - * @param { LinearGradientBlurOptions } options - the radius gradient blur options. + * @param { LinearGradientBlurOptions } gradientParam - the radius gradient blur options. * @returns { Filter } - Returns radius gradient blur Filter. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 19 */ - radiusGradientBlur(value: number, options: LinearGradientBlurOptions): Filter; + radiusGradientBlur(radius: number, gradientParam: LinearGradientBlurOptions): Filter; /** * Sets the deformation effect controlled by bezier curves of the component. @@ -221,6 +221,51 @@ declare namespace uiEffect { * @since 20 */ hdrBrightnessRatio(ratio: number): Filter; + + /** + * Sets variable radius blur effect with radius map. + * + * @param { number } radius - the blurring radius. + * The larger the blurring radius, the more blurring the content, + * and if the value is 0, the content blurring effect is not blurring. + * @param { Mask } radiusMap - the alpha of the mask determines the degree of blurring. + * @returns { Filter } - Returns the Filter that the current effect have been added. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + variableRadiusBlur(radius: number, radiusMap: Mask): Filter; + + /** + * Generates lighting effects from mask and directional light. + * + * @param { common2D.Point3d } direction - Direction of light + * @param { Color } color - Color of light + * @param { number } intensity - Intensity of light + * @param { Mask } [mask] - Mask, as a displacement map that affects lighting effects + * @param { number } [factor] - Mask scale factor, used to scale the mask channel values + * @returns { Filter } - Returns the Filter that the current effect have been added. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + directionLight(direction: common2D.Point3d, color: Color, intensity: number, mask?: Mask, factor?: number): Filter; + + /** + * Applies Transition with alpha mask + * + * @param { Mask } alphaMask - Animatable mask object + * @param { number } [factor] - The coefficient of the mask, defaulting to 1.0f [0~1] + * @param { boolean } [inverse] - Transition mode, default is fasle (true, false) + * @returns { Filter } - Returns the Filter that the current effect have been added. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + maskTransition(alphaMask: Mask, factor?: number, inverse?: boolean): Filter; } /** @@ -377,6 +422,22 @@ declare namespace uiEffect { */ borderLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: number, borderWidth: number): VisualEffect; + + /** + * Sets the color gradient effect, may blend with alpha mask. + * + * @param { Array } colors - array of colors. + * @param { Array } positions - the centers of colors. + * @param { Array } strengths - the weights of color Mixing. + * @param { Mask } [alphaMask] - the mask determines the alpha of the effect. + * @returns { VisualEffect } - Returns the VisualEffect that the current effect have been added. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + colorGradient(colors: Array, positions: Array, strengths: Array, + alphaMask?: Mask): VisualEffect; } /** @@ -384,10 +445,17 @@ declare namespace uiEffect { * @typedef { BrightnessBlender } * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since arkts {'1.1':'13', '1.2':'20'} + * @since 13 + */ + /** + * Defines the blending effect. + * @typedef { BrightnessBlender | HdrBrightnessBlender } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since arkts {'1.1':'20', '1.2':'20'} * @arkts 1.1&1.2 */ - type Blender = BrightnessBlender; + type Blender = BrightnessBlender | HdrBrightnessBlender; /** * The Blender of backgroundColorEffect. @@ -487,6 +555,17 @@ declare namespace uiEffect { fraction: number; } + /** + * The HDR enabled Blender of backgroundColorEffect. + * @extends BrightnessBlender + * @typedef HdrBrightnessBlender + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + interface HdrBrightnessBlender extends BrightnessBlender {} + /** * The Color of Light. * @typedef Color @@ -573,7 +652,7 @@ declare namespace uiEffect { * @param { common2D.Point } center * @param { number } radiusX * @param { number } radiusY - * @param { Array<[number, number]> } values + * @param { Array<[number, number]> } gradients * @returns { Mask } * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @static @@ -582,7 +661,24 @@ declare namespace uiEffect { * @since 20 */ static createRadialGradientMask(center: common2D.Point, radiusX: number, radiusY: number, - values: Array<[number, number]>): Mask; + gradients: Array<[number, number]>): Mask; + + /** + * Create a Mask of single wave gradient. + * @param { common2D.Point } center - The wave source center of the single-wave mask. + * @param { number } width - The circular ring width of the single-wave mask. + * @param { number } propagationRadius - The outer diffusion radius of the single-wave mask. + * @param { number } blurRadius - The blur radius of the single-wave mask. + * @param { number } [turbulenceStrength] - The turbulent displacement intensity of the single-wave mask. + * @returns { Mask } - Returns wave gradient mask. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + static createWaveGradientMask(center: common2D.Point, width: number, propagationRadius: number, + blurRadius: number, turbulenceStrength?: number): Mask; } /** @@ -603,7 +699,7 @@ declare namespace uiEffect { function createEffect(): VisualEffect; /** - * Create a BrightnessBlender to add BrightnessBlender to the component. + * Create a BrightnessBlender, which is used to adjust the brightness of UI components. * @param { BrightnessBlenderParam } param - The brightness blender parameters. * @returns { BrightnessBlender } Returns the blender. * @syscap SystemCapability.Graphics.Drawing @@ -612,6 +708,18 @@ declare namespace uiEffect { * @arkts 1.1&1.2 */ function createBrightnessBlender(param: BrightnessBlenderParam): BrightnessBlender; + + /** + * Create an HdrBrightnessBlender, which is used to adjust the HDR brightness of UI components. + * @param { BrightnessBlenderParam } param - The brightness blender parameters. + * @returns { HdrBrightnessBlender } Returns the blender. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + function createHdrBrightnessBlender(param: BrightnessBlenderParam): HdrBrightnessBlender; } /** diff --git a/api/@ohos.hiSysEvent.d.ts b/api/@ohos.hiSysEvent.d.ts index 68feb315d7dceac77661e46aa0bf03bc987f7e28..2a08c051c8f5e72bd5f800b6e87c62fa89fc7045 100644 --- a/api/@ohos.hiSysEvent.d.ts +++ b/api/@ohos.hiSysEvent.d.ts @@ -16,7 +16,6 @@ /** * @file * @kit PerformanceAnalysisKit - * @arkts 1.1&1.2 */ import { AsyncCallback } from './@ohos.base'; @@ -201,7 +200,8 @@ declare namespace hiSysEvent { * @enum {number} * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum RuleType { /** @@ -209,7 +209,8 @@ declare namespace hiSysEvent { * * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ WHOLE_WORD = 1, @@ -218,7 +219,8 @@ declare namespace hiSysEvent { * * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ PREFIX = 2, @@ -227,7 +229,8 @@ declare namespace hiSysEvent { * * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ REGULAR = 3 } @@ -238,7 +241,8 @@ declare namespace hiSysEvent { * @interface WatchRule * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface WatchRule { /** @@ -247,7 +251,8 @@ declare namespace hiSysEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -257,7 +262,8 @@ declare namespace hiSysEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -275,7 +281,8 @@ declare namespace hiSysEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ tag?: string; @@ -285,7 +292,8 @@ declare namespace hiSysEvent { * @type { RuleType } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ruleType: RuleType; } @@ -296,7 +304,8 @@ declare namespace hiSysEvent { * @interface Watcher * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface Watcher { /** @@ -305,7 +314,8 @@ declare namespace hiSysEvent { * @type { WatchRule[] } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ rules: WatchRule[]; @@ -315,7 +325,8 @@ declare namespace hiSysEvent { * @type { function } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ onEvent: (info: SysEventInfo) => void; @@ -325,7 +336,8 @@ declare namespace hiSysEvent { * @type { function } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ onServiceDied: () => void; } @@ -336,7 +348,8 @@ declare namespace hiSysEvent { * @interface QueryArg * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface QueryArg { /** @@ -345,7 +358,8 @@ declare namespace hiSysEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ beginTime: number; @@ -355,7 +369,8 @@ declare namespace hiSysEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ endTime: number; @@ -365,7 +380,8 @@ declare namespace hiSysEvent { * @type { number } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ maxEvents: number; @@ -375,7 +391,8 @@ declare namespace hiSysEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ fromSeq?: number; @@ -385,7 +402,8 @@ declare namespace hiSysEvent { * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ toSeq?: number; } @@ -396,7 +414,8 @@ declare namespace hiSysEvent { * @interface QueryRule * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface QueryRule { /** @@ -405,7 +424,8 @@ declare namespace hiSysEvent { * @type { string } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -415,7 +435,8 @@ declare namespace hiSysEvent { * @type { string[] } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ names: string[]; @@ -425,7 +446,8 @@ declare namespace hiSysEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ condition?: string; } @@ -436,7 +458,8 @@ declare namespace hiSysEvent { * @interface Querier * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface Querier { /** @@ -445,7 +468,8 @@ declare namespace hiSysEvent { * @type { function } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ onQuery: (infos: SysEventInfo[]) => void; @@ -455,7 +479,8 @@ declare namespace hiSysEvent { * @type { function } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ onComplete: (reason: number, total: number) => void; } @@ -475,7 +500,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200102 - The number of watch rules exceeds the limit. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function addWatcher(watcher: Watcher): void; @@ -493,7 +519,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200201 - The watcher does not exist. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function removeWatcher(watcher: Watcher): void; @@ -516,7 +543,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200304 - The query frequency exceeds the limit. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function query(queryArg: QueryArg, rules: QueryRule[], querier: Querier): void; @@ -538,7 +566,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200304 – The query frequency exceeds the limit. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function exportSysEvents(queryArg: QueryArg, rules: QueryRule[]): number; @@ -558,7 +587,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200302 - Invalid query rule. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function subscribe(rules: QueryRule[]): number; @@ -575,7 +605,8 @@ declare namespace hiSysEvent { * @throws {BusinessError} 11200305 – Unsubscription failed. * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function unsubscribe(): void; } diff --git a/api/@ohos.hiTraceChain.d.ts b/api/@ohos.hiTraceChain.d.ts index 0e3c01da192dbe54f4b2216657b8ea4fcbf8e550..e10a356cdc279dee30f1673d4919fa9a35f63ab9 100644 --- a/api/@ohos.hiTraceChain.d.ts +++ b/api/@ohos.hiTraceChain.d.ts @@ -26,7 +26,8 @@ * * @namespace hiTraceChain * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hiTraceChain { /** @@ -34,14 +35,16 @@ declare namespace hiTraceChain { * * @enum { number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ enum HiTraceFlag { /** * Default value * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -49,7 +52,8 @@ declare namespace hiTraceChain { * Trace sync and async call. default: trace sync call only. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ INCLUDE_ASYNC = 1, @@ -57,7 +61,8 @@ declare namespace hiTraceChain { * Do not create child span. default: create child span. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ DONOT_CREATE_SPAN = 1 << 1, @@ -65,7 +70,8 @@ declare namespace hiTraceChain { * Output tracepoint info in span. default: do not output tracepoint info. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ TP_INFO = 1 << 2, @@ -73,7 +79,8 @@ declare namespace hiTraceChain { * Do not output begin and end info. default: output begin and end info. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ NO_BE_INFO = 1 << 3, @@ -81,7 +88,8 @@ declare namespace hiTraceChain { * Do not add id to log. default: add id to log. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLE_LOG = 1 << 4, @@ -89,7 +97,8 @@ declare namespace hiTraceChain { * The trace is triggered by fault. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ FAILURE_TRIGGER = 1 << 5, @@ -97,7 +106,8 @@ declare namespace hiTraceChain { * Output device-to-device tracepoint info in span only. default: do not output device-to-device tracepoint info. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ D2D_TP_INFO = 1 << 6 } @@ -107,14 +117,16 @@ declare namespace hiTraceChain { * * @enum { number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ enum HiTraceTracepointType { /** * Client send * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ CS = 0, @@ -122,7 +134,8 @@ declare namespace hiTraceChain { * Client receive * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ CR = 1, @@ -130,7 +143,8 @@ declare namespace hiTraceChain { * Server send * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ SS = 2, @@ -138,7 +152,8 @@ declare namespace hiTraceChain { * Server receive * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ SR = 3, @@ -146,7 +161,8 @@ declare namespace hiTraceChain { * General info * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ GENERAL = 4 } @@ -156,14 +172,16 @@ declare namespace hiTraceChain { * * @enum { number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ enum HiTraceCommunicationMode { /** * Unspecified * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, @@ -171,7 +189,8 @@ declare namespace hiTraceChain { * Thread-to-thread * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ THREAD = 1, @@ -179,7 +198,8 @@ declare namespace hiTraceChain { * Process-to-process * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ PROCESS = 2, @@ -187,7 +207,8 @@ declare namespace hiTraceChain { * Device-to-device * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE = 3 } @@ -197,7 +218,8 @@ declare namespace hiTraceChain { * * @interface HiTraceId * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ interface HiTraceId { /** @@ -205,7 +227,8 @@ declare namespace hiTraceChain { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ chainId: bigint; @@ -214,7 +237,8 @@ declare namespace hiTraceChain { * * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ spanId?: number; @@ -223,7 +247,8 @@ declare namespace hiTraceChain { * * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ parentSpanId?: number; @@ -232,7 +257,8 @@ declare namespace hiTraceChain { * * @type { ?number } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ flags?: number; } @@ -244,7 +270,8 @@ declare namespace hiTraceChain { * @param { number } flags Trace function flag. * @returns { HiTraceId } Valid if first call, otherwise invalid. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function begin(name: string, flags?: number): HiTraceId; @@ -254,7 +281,8 @@ declare namespace hiTraceChain { * * @param { HiTraceId } id The trace id that need to stop. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function end(id: HiTraceId): void; @@ -264,7 +292,8 @@ declare namespace hiTraceChain { * * @returns { HiTraceId } Valid if current thread have a trace id, otherwise invalid. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getId(): HiTraceId; @@ -273,7 +302,8 @@ declare namespace hiTraceChain { * * @param { HiTraceId } id Set id as trace id of current thread. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function setId(id: HiTraceId): void; @@ -281,7 +311,8 @@ declare namespace hiTraceChain { * Clear trace id of current thread and set it invalid. * * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function clearId(): void; @@ -290,7 +321,8 @@ declare namespace hiTraceChain { * * @returns { HiTraceId } A valid span trace id. Otherwise trace id of current thread if do not allow create span. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function createSpan(): HiTraceId; @@ -302,7 +334,8 @@ declare namespace hiTraceChain { * @param { HiTraceId } id Trace id that need to print. * @param { string } msg Customized info that need to print. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function tracepoint(mode: HiTraceCommunicationMode, type: HiTraceTracepointType, id: HiTraceId, msg?: string): void; @@ -312,7 +345,8 @@ declare namespace hiTraceChain { * @param { HiTraceId } id Trace id that need to judge. * @returns { boolean } True for a valid trace id, otherwise false. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function isValid(id: HiTraceId): boolean; @@ -323,7 +357,8 @@ declare namespace hiTraceChain { * @param { HiTraceFlag } flag Trace flag that need to judge. * @returns { boolean } true if the trace id has enabled the flag. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function isFlagEnabled(id: HiTraceId, flag: HiTraceFlag): boolean; @@ -333,7 +368,8 @@ declare namespace hiTraceChain { * @param { HiTraceId } id Trace id that need to enable a flag. * @param { HiTraceFlag } flag the designative trace flag that need to be enabled in the trace id. * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function enableFlag(id: HiTraceId, flag: HiTraceFlag): void; } diff --git a/api/@ohos.hiTraceMeter.d.ts b/api/@ohos.hiTraceMeter.d.ts index 47b2820207864e15f14ebd668c453eefd80d8cf3..6b1a88c15141555ae526611a4f0f109ae8544ab0 100644 --- a/api/@ohos.hiTraceMeter.d.ts +++ b/api/@ohos.hiTraceMeter.d.ts @@ -135,6 +135,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ enum HiTraceOutputLevel { /** @@ -151,6 +152,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ DEBUG = 0, @@ -168,6 +170,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ INFO = 1, @@ -185,6 +188,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ CRITICAL = 2, @@ -202,6 +206,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ COMMERCIAL = 3, @@ -219,6 +224,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ MAX = COMMERCIAL } @@ -336,6 +342,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function traceByValue(name: string, count: number): void; @@ -348,7 +355,7 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { string } customArgs Indicates key=value pair to be output in trace; multiple pairs should use comma + * @param { string } [customArgs] Indicates key=value pair to be output in trace; multiple pairs should use comma * as separator. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice @@ -363,12 +370,13 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { string } customArgs Indicates key=value pair to be output in trace; multiple pairs should use comma + * @param { string } [customArgs] Indicates key=value pair to be output in trace; multiple pairs should use comma * as separator. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function startSyncTrace(level: HiTraceOutputLevel, name: string, customArgs?: string): void; @@ -396,6 +404,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function finishSyncTrace(level: HiTraceOutputLevel): void; @@ -411,7 +420,7 @@ declare namespace hiTraceMeter { * @param { number } taskId The unique id used to distinguish the task and match with the id of the * corresponding finishAsyncTrace. * @param { string } customCategory Indicates the label to aggregate asynchronous task display. - * @param { string } customArgs Indicates key=value pair to be output in trace; multiple pairs should use comma + * @param { string } [customArgs] Indicates key=value pair to be output in trace; multiple pairs should use comma * as Separator. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice @@ -429,12 +438,13 @@ declare namespace hiTraceMeter { * @param { number } taskId The unique id used to distinguish the task and match with the id of the * corresponding finishAsyncTrace. * @param { string } customCategory Indicates the label to aggregate asynchronous task display. - * @param { string } customArgs Indicates key=value pair to be output in trace; multiple pairs should use comma + * @param { string } [customArgs] Indicates key=value pair to be output in trace; multiple pairs should use comma * as Separator. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function startAsyncTrace(level: HiTraceOutputLevel, name: string, taskId: number, customCategory: string, customArgs?: string): void; @@ -469,6 +479,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function finishAsyncTrace(level: HiTraceOutputLevel, name: string, taskId: number): void; @@ -492,6 +503,7 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function traceByValue(level: HiTraceOutputLevel, name: string, count: number): void; @@ -511,9 +523,9 @@ declare namespace hiTraceMeter { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ function isTraceEnabled(): boolean; - } export default hiTraceMeter; diff --git a/api/@ohos.hichecker.d.ts b/api/@ohos.hichecker.d.ts index 22e2a89fd3617deec46cd5c7f1c1e251c410a497..ca1a68ee5e5019fefe3b8acee6ea0bd7d824a850 100644 --- a/api/@ohos.hichecker.d.ts +++ b/api/@ohos.hichecker.d.ts @@ -23,7 +23,8 @@ * * @namespace hichecker * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hichecker { /** @@ -31,45 +32,50 @@ declare namespace hichecker { * * @constant * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - const RULE_CAUTION_PRINT_LOG: 9223372036854775808n; // 1 << 63 + const RULE_CAUTION_PRINT_LOG = 9223372036854775808n; // 1 << 63 /** * The caution rule trigger crash. * * @constant * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - const RULE_CAUTION_TRIGGER_CRASH: 4611686018427387904n; // 1 << 62 + const RULE_CAUTION_TRIGGER_CRASH = 4611686018427387904n; // 1 << 62 /** * The thread rule check slow process. * * @constant * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - const RULE_THREAD_CHECK_SLOW_PROCESS: 1n; + const RULE_THREAD_CHECK_SLOW_PROCESS = 1n; /** * The process rule check ability connection leak. * * @constant * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - const RULE_CHECK_ABILITY_CONNECTION_LEAK: 8589934592n; // 1 << 33 + const RULE_CHECK_ABILITY_CONNECTION_LEAK = 8589934592n; // 1 << 33 /** * The process rule check ability Arkui performance * * @constant * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - const RULE_CHECK_ARKUI_PERFORMANCE: 17179869184n; // 1 << 34 + const RULE_CHECK_ARKUI_PERFORMANCE = 17179869184n; // 1 << 34 /** * add one or more rule. @@ -98,7 +104,8 @@ declare namespace hichecker { * * @returns { bigint } all added thread rule and process rule. * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getRule(): bigint; @@ -120,7 +127,8 @@ declare namespace hichecker { * @param { bigint } rule * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function addCheckRule(rule: bigint): void; @@ -130,7 +138,8 @@ declare namespace hichecker { * @param { bigint } rule * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function removeCheckRule(rule: bigint): void; @@ -141,7 +150,8 @@ declare namespace hichecker { * @returns { boolean } the result of whether the query rule is added. * @throws { BusinessError } 401 - the parameter check failed, only one bigint type parameter is needed * @syscap SystemCapability.HiviewDFX.HiChecker - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function containsCheckRule(rule: bigint): boolean; } diff --git a/api/@ohos.hidebug.d.ts b/api/@ohos.hidebug.d.ts index 604bd743cf0a2468663c98cb3958ad34f518b54a..7cd3a5efb5c5a9a654681275e35f4fdb58e60d54 100644 --- a/api/@ohos.hidebug.d.ts +++ b/api/@ohos.hidebug.d.ts @@ -37,7 +37,8 @@ * @namespace hidebug * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hidebug { /** @@ -46,7 +47,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the total number of bytes occupied by the total space. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getNativeHeapSize(): bigint; @@ -55,7 +57,8 @@ declare namespace hidebug { * a process, which is measured by the memory allocator. * @returns { bigint } Returns the total number of bytes occupied by the total allocated space. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getNativeHeapAllocatedSize(): bigint; @@ -65,7 +68,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the size of the memory occupied by the free normal blocks held by the process, in bytes. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getNativeHeapFreeSize(): bigint; @@ -75,7 +79,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the virtual set size used by the application process, in KB. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getVss(): bigint; @@ -85,7 +90,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the size of the physical memory actually used by the application process, in KB. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getPss(): bigint; @@ -95,7 +101,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the size of the shared dirty memory of the process, in KB. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharedDirty(): bigint; @@ -105,7 +112,8 @@ declare namespace hidebug { * * @returns { bigint } Returns the size of the private dirty memory of the process, in KB. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getPrivateDirty(): bigint; @@ -114,7 +122,8 @@ declare namespace hidebug { * * @returns { number } Returns the CPU usage of the process. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getCpuUsage(): number; @@ -210,7 +219,8 @@ declare namespace hidebug { * 2.the args parameter is not string array. * @throws {BusinessError} 11400101 - ServiceId invalid. The system ability does not exist. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getServiceDump(serviceid: number, fd: number, args: Array): void; @@ -220,7 +230,8 @@ declare namespace hidebug { * @returns { number } Returns the CPU usage of the system. * @throws { BusinessError } 11400104 - The status of the system CPU usage is abnormal. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getSystemCpuUsage(): number; @@ -229,7 +240,8 @@ declare namespace hidebug { * * @interface ThreadCpuUsage * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ThreadCpuUsage { /** @@ -237,7 +249,8 @@ declare namespace hidebug { * * @type { number } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ threadId: number; /** @@ -245,7 +258,8 @@ declare namespace hidebug { * * @type { number } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cpuUsage: number; } @@ -255,7 +269,8 @@ declare namespace hidebug { * * @returns { ThreadCpuUsage[] } Returns the CPU usage of all threads of the current application process. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getAppThreadCpuUsage(): ThreadCpuUsage[]; @@ -264,7 +279,8 @@ declare namespace hidebug { * * @interface SystemMemInfo * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SystemMemInfo { /** @@ -273,7 +289,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ totalMem: bigint; /** @@ -282,7 +299,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ freeMem: bigint; /** @@ -291,7 +309,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ availableMem: bigint; } @@ -301,7 +320,8 @@ declare namespace hidebug { * * @returns { SystemMemInfo } Returns the system memory information. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getSystemMemInfo(): SystemMemInfo; @@ -310,7 +330,8 @@ declare namespace hidebug { * * @interface NativeMemInfo * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface NativeMemInfo { /** @@ -320,7 +341,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pss: bigint; /** @@ -330,7 +352,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ vss: bigint; /** @@ -339,7 +362,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rss: bigint; /** @@ -348,7 +372,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sharedDirty: bigint; /** @@ -357,7 +382,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privateDirty: bigint; /** @@ -366,7 +392,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sharedClean: bigint; /** @@ -375,7 +402,8 @@ declare namespace hidebug { * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privateClean: bigint; } @@ -386,7 +414,8 @@ declare namespace hidebug { * * @returns { NativeMemInfo } Returns the memory information of the application process. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getAppNativeMemInfo(): NativeMemInfo; @@ -441,6 +470,29 @@ declare namespace hidebug { */ function getAppMemoryLimit(): MemoryLimit; + /** + * Obtains the memory information of the application process asynchronous. This API is implemented + * by reading data from the /proc/{pid}/smaps_rollup and /proc/{pid}/statm node. + * + * @returns { Promise } Returns the memory information of the application process. + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @since 20 + */ + function getAppNativeMemInfoAsync(): Promise; + + /** + * Obtains the memory information of the application process, with optional caching to improve performance. + * The cached value remains valid for 5 minutes. This API is implemented by reading data from the + * /proc/{pid}/smaps_rollup and /proc/{pid}/statm node. + * + * @param { boolean } [forceRefresh] Whether to retrieve fresh data and immediate refresh the cached value. + * The default value is false. + * @returns { NativeMemInfo } Returns the memory information of the application process. + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @since 20 + */ + function getAppNativeMemInfoWithCache(forceRefresh?: boolean): NativeMemInfo; + /** * Describes the VM memory information. * @@ -489,21 +541,24 @@ declare namespace hidebug { * * @enum { number } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TraceFlag { /** * The main thread of the application. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MAIN_THREAD = 1, /** * All threads of the application. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_THREADS = 2 } @@ -513,231 +568,264 @@ declare namespace hidebug { * * @namespace tags * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ namespace tags { /** * Ability Manager tag. The corresponding HiTrace command is tagName:ability. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ABILITY_MANAGER: number; /** * ArkUI development framework. The corresponding HiTrace command is tagName:ace. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ARKUI: number; /** * JSVM VM. The corresponding HiTrace command is tagName:ark. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ARK: number; /** * Bluetooth. The corresponding HiTrace command is tagName:bluetooth. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const BLUETOOTH: number; /** * Common library subsystem. The corresponding HiTrace command is tagName:commonlibrary. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const COMMON_LIBRARY: number; /** * Distributed hardware device management. The corresponding HiTrace command is tagName:devicemanager. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_HARDWARE_DEVICE_MANAGER: number; /** * Distributed audio. The corresponding HiTrace command is tagName:daudio. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_AUDIO: number; /** * Distributed camera. The corresponding HiTrace command is tagName:dcamera. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_CAMERA: number; /** * Distributed data management. The corresponding HiTrace command is tagName:distributeddatamgr. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_DATA: number; /** * Distributed hardware framework. The corresponding HiTrace command is tagName:dhfwk. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_HARDWARE_FRAMEWORK: number; /** * Distributed input. The corresponding HiTrace command is tagName:dinput. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_INPUT: number; /** * Distributed screen. The corresponding HiTrace command is tagName:dscreen. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SCREEN: number; /** * Distributed scheduler. The corresponding HiTrace command is tagName:dsched. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SCHEDULER: number; /** * FFRT task. The corresponding HiTrace command is tagName:ffrt. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const FFRT: number; /** * File management system. The corresponding HiTrace command is tagName:filemanagement. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const FILE_MANAGEMENT: number; /** * Global resource management. The corresponding HiTrace command is tagName:gresource. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const GLOBAL_RESOURCE_MANAGER: number; /** * Graphics module. The corresponding HiTrace command is tagName:graphic. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const GRAPHICS: number; /** * HDF subsystem. The corresponding HiTrace command is tagName:hdf. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const HDF: number; /** * MISC module. The corresponding HiTrace command is tagName:misc. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MISC: number; /** * Multi-modal input module. The corresponding HiTrace command is tagName:multimodalinput. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MULTIMODAL_INPUT: number; /** * Network. The corresponding HiTrace command is tagName:net. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NET: number; /** * Notification module. The corresponding HiTrace command is tagName:notification. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NOTIFICATION: number; /** * Nweb. The corresponding HiTrace command is tagName:nweb. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NWEB: number; /** * OHOS. The corresponding HiTrace command is tagName:ohos. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const OHOS: number; /** * Power management. The corresponding HiTrace command is tagName:power. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const POWER_MANAGER: number; /** * RPC. The corresponding HiTrace command is tagName:rpc. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const RPC: number; /** * System capability management. The corresponding HiTrace command is tagName:samgr. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const SAMGR: number; /** * Window management. The corresponding HiTrace command is tagName:window. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const WINDOW_MANAGER: number; /** * Audio module. The corresponding HiTrace command is tagName:zaudio. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const AUDIO: number; /** * Camera module. The corresponding HiTrace command is tagName:zcamera. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const CAMERA: number; /** * Image module. The corresponding HiTrace command is tagName:zimage. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const IMAGE: number; /** * Media module. The corresponding HiTrace command is tagName:zmedia. * * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MEDIA: number; } @@ -760,7 +848,8 @@ declare namespace hidebug { * @throws { BusinessError } 11400103 - No write permission on the file. * @throws { BusinessError } 11400104 - Abnormal trace status. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function startAppTraceCapture(tags: number[], flag: TraceFlag, limitSize: number): string; @@ -771,7 +860,8 @@ declare namespace hidebug { * @throws { BusinessError } 11400104 - The status of the trace is abnormal. * @throws { BusinessError } 11400105 - No capture trace running. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function stopAppTraceCapture(): void; @@ -785,6 +875,15 @@ declare namespace hidebug { */ type GcStats = Record; + /** + * Obtains the memory usage of ArkTS objects in the virtual machine. + * + * @returns { bigint } Returns the memory usage of ArkTS objects. + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @since 21 + */ + function getAppVMObjectUsed(): bigint; + /** * Obtains all system GC statistics. * @@ -811,7 +910,7 @@ declare namespace hidebug { * Sets the number of FDs, number of threads, JS memory, or native memory limit of the application. * * @param { string } type - resource type. It could be pss_memory、js_heap、fd、or thread. - * @param { number } value - For different resource type, values could have different meaning: + * @param { int } value - For different resource type, values could have different meaning: * 1.For pss_memory, it means the baseline PSS memory size for the application, * system memory control will be triggered if exceed the value too much. * 2.For js_heap, it means the percentage of the used JS heap memory to the maximum limit exceed @@ -829,7 +928,7 @@ declare namespace hidebug { * @atomicservice * @since 12 */ - function setAppResourceLimit(type: string, value: number, enableDebugLog: boolean): void; + function setAppResourceLimit(type: string, value: int, enableDebugLog: boolean): void; /** * Obtains the debugging state of an application process. If the Ark or native layer of the application process is in @@ -848,7 +947,8 @@ declare namespace hidebug { * @throws { BusinessError } 11400104 - Failed to get the application memory due to a remote exception. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function getGraphicsMemory(): Promise; @@ -859,10 +959,55 @@ declare namespace hidebug { * @throws { BusinessError } 11400104 - Failed to get the application memory due to a remote exception. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function getGraphicsMemorySync(): number; + /** + * Graphics memory summary. + * + * @interface GraphicsMemorySummary + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @atomicservice + * @since 21 + */ + interface GraphicsMemorySummary { + /** + * GL memory + * + * @type { number } + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @atomicservice + * @since 21 + */ + gl: number; + + /** + * Graph memory + * + * @type { number } + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @atomicservice + * @since 21 + */ + graph: number; + } + + /** + * Obtains the size of the GPU memory summary. This API uses a promise to return the result. + * + * @param { number } [interval] If the cache of graphics memory is older than interval (unit: second), the latest + * graphics memory data will be obtained. The interval value range is 2 seconds to + * 3600 seconds, If interval is an invalid value, the default value is 300 seconds. + * @returns { Promise } Returns the size of the GPU memory summary, in KB. + * @throws { BusinessError } 11400104 - Failed to get the application memory due to a remote exception. + * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug + * @atomicservice + * @since 21 + */ + function getGraphicsMemorySummary(interval?: number): Promise; + /** * Dumps the original heap snapshot of the VM for the current thread. The API uses a promise to return the path of the * .rawheap file. You can use rawheap-translator to convert the generated file into a .heapsnapshot file for parsing. @@ -969,7 +1114,7 @@ declare namespace hidebug { * On top of level 1 trimming, object address size has been additionally trimmed. * Please use latest version of rawheap-translator tool for parsing and converting * .rawheap into .heapsnapshot file. Conversion process may fail when legacy tool is utilized. - * + * * A higher trimming level means a longer time needed to generate the .rawheap file. * Ensure that this duration falls below the app freeze threshold. * diff --git a/api/@ohos.hilog.d.ts b/api/@ohos.hilog.d.ts index 88d6fe7cc0b989f463015fe8fcf729973713f0ed..6f94ea48ed50bdabb0fa86a819129ab75a24b87d 100644 --- a/api/@ohos.hilog.d.ts +++ b/api/@ohos.hilog.d.ts @@ -16,36 +16,47 @@ /** * @file * @kit PerformanceAnalysisKit - * @arkts 1.1&1.2 */ /** -* Provides interfaces to generate system logs. -* -* @namespace hilog -* @syscap SystemCapability.HiviewDFX.HiLog -* @since 7 -*/ + * Provides interfaces to generate system logs. + * + * @namespace hilog + * @syscap SystemCapability.HiviewDFX.HiLog + * @since 7 + */ /** -* Provides interfaces to generate system logs. -* -* @namespace hilog -* @syscap SystemCapability.HiviewDFX.HiLog -* @crossplatform -* @since 10 -*/ + * Provides interfaces to generate system logs. + * + * @namespace hilog + * @syscap SystemCapability.HiviewDFX.HiLog + * @crossplatform + * @since 10 + */ /** -* Provides interfaces to generate system logs. -* -* @namespace hilog -* @syscap SystemCapability.HiviewDFX.HiLog -* @crossplatform -* @atomicservice -* @since arkts {'1.1':'11','1.2':'20'} -* @arkts 1.1&1.2 -*/ + * Provides interfaces to generate system logs. + * + * @namespace hilog + * @syscap SystemCapability.HiviewDFX.HiLog + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ declare namespace hilog { + /** + * Using RecordData Replace any, unknown, ESObject. + * + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.HiviewDFX.HiLog + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type RecordData = undefined | null | Object | Record | Array; + /** * Outputs debug-level logs. * @@ -60,8 +71,8 @@ declare namespace hilog { /** * Outputs debug-level logs. * - * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF - * if the value exceeds the range, logs cannot be printed. + * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. * @param { any[] }args Indicates the log parameters. @@ -82,20 +93,23 @@ declare namespace hilog { * @atomicservice * @since 11 */ + function debug(domain: number, tag: string, format: string, ...args: any[]): void; + /** * Outputs debug-level logs. * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. - * @param { (Object | undefined | null)[] }args Indicates the log parameters. + * @param { RecordData[] }args Indicates the log parameters. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - function debug(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function debug(domain: number, tag: string, format: string, ...args: RecordData[]): void; /** * Outputs info-level logs. @@ -133,20 +147,23 @@ declare namespace hilog { * @atomicservice * @since 11 */ + function info(domain: number, tag: string, format: string, ...args: any[]): void; + /** * Outputs info-level logs. * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. - * @param { (Object | undefined | null)[] }args Indicates the log parameters. + * @param { RecordData[] }args Indicates the log parameters. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - function info(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function info(domain: number, tag: string, format: string, ...args: RecordData[]): void; /** * Outputs warning-level logs. @@ -184,20 +201,23 @@ declare namespace hilog { * @atomicservice * @since 11 */ + function warn(domain: number, tag: string, format: string, ...args: any[]): void; + /** * Outputs warning-level logs. * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. - * @param { (Object | undefined | null)[] }args Indicates the log parameters. + * @param { RecordData[] }args Indicates the log parameters. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - function warn(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function warn(domain: number, tag: string, format: string, ...args: RecordData[]): void; /** * Outputs error-level logs. @@ -235,20 +255,23 @@ declare namespace hilog { * @atomicservice * @since 11 */ + function error(domain: number, tag: string, format: string, ...args: any[]): void; + /** * Outputs error-level logs. * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. - * @param { (Object | undefined | null)[] }args Indicates the log parameters. + * @param { RecordData[] }args Indicates the log parameters. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - function error(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function error(domain: number, tag: string, format: string, ...args: RecordData[]): void; /** * Outputs fatal-level logs. @@ -286,20 +309,23 @@ declare namespace hilog { * @atomicservice * @since 11 */ + function fatal(domain: number, tag: string, format: string, ...args: any[]): void; + /** * Outputs fatal-level logs. * * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * if the value exceeds the range, logs cannot be printed. * @param { string } tag Identifies the log tag, length cannot exceed 32 bytes, the excess part will be truncated. * @param { string } format Indicates the log format string. - * @param { (Object | undefined | null)[] }args Indicates the log parameters. + * @param { RecordData[] }args Indicates the log parameters. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - function fatal(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function fatal(domain: number, tag: string, format: string, ...args: RecordData[]): void; /** * Checks whether logs of the specified tag, and level can be printed. @@ -333,7 +359,8 @@ declare namespace hilog { * @param { LogLevel } level log level * @syscap SystemCapability.HiviewDFX.HiLog * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function setMinLogLevel(level: LogLevel): void; diff --git a/api/@ohos.hiviewdfx.hiAppEvent.d.ts b/api/@ohos.hiviewdfx.hiAppEvent.d.ts index 6ef79c5df6be8f8a229b71ef25cab6dc9bd6c58f..7c29a94a39d459a7ba74541c91dd505c128f06f9 100644 --- a/api/@ohos.hiviewdfx.hiAppEvent.d.ts +++ b/api/@ohos.hiviewdfx.hiAppEvent.d.ts @@ -191,7 +191,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ namespace domain { /** @@ -207,7 +208,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ const OS: string; } @@ -240,7 +242,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ namespace event { /** @@ -254,7 +257,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_LOGIN: string; @@ -269,7 +273,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_LOGOUT: string; @@ -284,7 +289,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_START: string; @@ -301,7 +307,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_CRASH: string; @@ -310,7 +317,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_FREEZE: string; @@ -319,7 +327,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const APP_LAUNCH: string; @@ -328,7 +337,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const SCROLL_JANK: string; @@ -337,7 +347,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const CPU_USAGE_HIGH: string; @@ -346,7 +357,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const BATTERY_USAGE: string; @@ -355,7 +367,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const RESOURCE_OVERLIMIT: string; @@ -364,7 +377,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ADDRESS_SANITIZER: string; @@ -373,7 +387,8 @@ declare namespace hiAppEvent { * * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MAIN_THREAD_JANK: string; @@ -386,6 +401,28 @@ declare namespace hiAppEvent { * @since 20 */ const APP_KILLED: string; + + /** + * App task execution timeout event. This is a system event name constant. + * + * @type { string } + * @syscap SystemCapability.HiviewDFX.HiAppEvent + * @atomicservice + * @since arkts {'1.1':'21','1.2':'22'} + * @arkts 1.1&1.2 + */ + const APP_HICOLLIE: string; + + /** + * Audio jank frame. This is a system event name constant. + * + * @type { string } + * @syscap SystemCapability.HiviewDFX.HiAppEvent + * @atomicservice + * @since arkts {'1.1':'21','1.2':'22'} + * @arkts 1.1&1.2 + */ + const AUDIO_JANK_FRAME: string; } /** @@ -410,7 +447,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ namespace param { /** @@ -432,7 +470,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ const USER_ID: string; @@ -455,7 +494,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_NAME: string; @@ -478,7 +518,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ const DISTRIBUTED_SERVICE_INSTANCE_ID: string; } @@ -488,7 +529,7 @@ declare namespace hiAppEvent { * * @param { ConfigOption } config Configuration items for application event logging. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11103001 - Invalid max storage quota value. + * @throws { BusinessError } 11103001 - Invalid max storage quota value. Possible caused by incorrectly formatted. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 @@ -499,7 +540,7 @@ declare namespace hiAppEvent { * @param { ConfigOption } config Configuration items for application event logging. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11103001 - Invalid max storage quota value. + * @throws { BusinessError } 11103001 - Invalid max storage quota value. Possible caused by incorrectly formatted. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice @@ -511,12 +552,13 @@ declare namespace hiAppEvent { * @param { ConfigOption } config Configuration items for application event logging. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11103001 - Invalid max storage quota value. + * @throws { BusinessError } 11103001 - Invalid max storage quota value. Possible caused by incorrectly formatted. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function configure(config: ConfigOption): void; @@ -542,7 +584,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface ConfigOption { /** @@ -573,7 +616,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ disable?: boolean; @@ -608,7 +652,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ maxStorage?: string; } @@ -806,12 +851,16 @@ declare namespace hiAppEvent { * name and the system event name constant defined in Event. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -828,12 +877,16 @@ declare namespace hiAppEvent { * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -851,12 +904,16 @@ declare namespace hiAppEvent { * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -877,12 +934,16 @@ declare namespace hiAppEvent { * event name and the system event name constant defined in Event. * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -899,12 +960,16 @@ declare namespace hiAppEvent { * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -922,12 +987,16 @@ declare namespace hiAppEvent { * @param { AsyncCallback } callback Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11100001 - Function disabled. - * @throws { BusinessError } 11101001 - Invalid event domain. - * @throws { BusinessError } 11101002 - Invalid event name. - * @throws { BusinessError } 11101003 - Invalid number of event parameters. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101003 - Invalid number of event parameters. Possible caused by the number of parameters + *
is over 32. * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. - * @throws { BusinessError } 11101005 - Invalid event parameter name. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101006 - Invalid array length of the event parameter. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -953,7 +1022,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ type ParamType = number | string | boolean | Array; @@ -978,6 +1048,14 @@ declare namespace hiAppEvent { * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101007 - The number of parameter keys exceeds the limit. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -1005,12 +1083,21 @@ declare namespace hiAppEvent { * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. + * @throws { BusinessError } 11100001 - Function disabled. Possible caused by the param disable in ConfigOption is true. + * @throws { BusinessError } 11101001 - Invalid event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101002 - Invalid event name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11101004 - Invalid string length of the event parameter. + * @throws { BusinessError } 11101005 - Invalid event parameter name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @throws { BusinessError } 11101007 - The number of parameter keys exceeds the limit. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function setEventParam(params: Record, domain: string, name?: string): Promise; @@ -1031,7 +1118,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function setEventConfig(name: string, config: Record): Promise; @@ -1060,7 +1148,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventPackage { /** @@ -1085,7 +1174,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ packageId: number; @@ -1111,7 +1201,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ row: number; @@ -1137,7 +1228,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ size: number; @@ -1163,7 +1255,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ data: string[]; @@ -1182,7 +1275,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ appEventInfos: Array; } @@ -1206,7 +1300,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ class AppEventPackageHolder { /** @@ -1237,7 +1332,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(watcherName: string); @@ -1247,7 +1343,8 @@ declare namespace hiAppEvent { * @param { number } size Data size threshold, in bytes. The value range is [0, $2^{31}$-1]. If the value is out of * the range, an exception is thrown. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11104001 - Invalid size value. + * @throws { BusinessError } 11104001 - Invalid size value. Possible caused by the size value is less than or equal + *
to zero. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ @@ -1258,7 +1355,8 @@ declare namespace hiAppEvent { * the range, an exception is thrown. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. + * @throws { BusinessError } 11104001 - Invalid size value. Possible caused by the size value is less than or equal + *
to zero. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1270,11 +1368,13 @@ declare namespace hiAppEvent { * the range, an exception is thrown. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. + * @throws { BusinessError } 11104001 - Invalid size value. Possible caused by the size value is less than or equal + *
to zero. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setSize(size: number): void; @@ -1286,7 +1386,8 @@ declare namespace hiAppEvent { * exception is thrown. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. + * @throws { BusinessError } 11104001 - Invalid size value. Possible caused by the size value is less than or equal + *
to zero. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 12 @@ -1299,11 +1400,13 @@ declare namespace hiAppEvent { * exception is thrown. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11104001 - Invalid size value. + * @throws { BusinessError } 11104001 - Invalid size value. Possible caused by the size value is less than or equal + *
to zero. * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setRow(size: number): void; @@ -1344,7 +1447,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ takeNext(): AppEventPackage; } @@ -1371,7 +1475,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface TriggerCondition { /** @@ -1402,7 +1507,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ row?: number; @@ -1434,7 +1540,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ size?: number; @@ -1466,7 +1573,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ timeOut?: number; } @@ -1499,7 +1607,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventFilter { /** @@ -1527,7 +1636,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -1553,7 +1663,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ eventTypes?: EventType[]; @@ -1572,7 +1683,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ names?: string[]; } @@ -1594,7 +1706,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventGroup { /** @@ -1612,7 +1725,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -1631,7 +1745,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ appEventInfos: Array; } @@ -1661,7 +1776,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Watcher { /** @@ -1692,7 +1808,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -1721,7 +1838,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ triggerCondition?: TriggerCondition; @@ -1750,7 +1868,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ appEventFilters?: AppEventFilter[]; @@ -1788,7 +1907,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onTrigger?: (curRow: number, curSize: number, holder: AppEventPackageHolder) => void; @@ -1813,7 +1933,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ onReceive?: (domain: string, appEventGroups: Array) => void; } @@ -1824,11 +1945,13 @@ declare namespace hiAppEvent { * @param { Watcher } watcher Event watcher. * @returns { AppEventPackageHolder } Subscription data holder. If the subscription fails, null is returned. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @throws { BusinessError } 11102002 - Invalid filtering event domain. - * @throws { BusinessError } 11102003 - Invalid row value. - * @throws { BusinessError } 11102004 - Invalid size value. - * @throws { BusinessError } 11102005 - Invalid timeout value. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102002 - Invalid filtering event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102003 - Invalid row value. Possible caused by the row value is less than zero. + * @throws { BusinessError } 11102004 - Invalid size value. Possible caused by the size value is less than zero. + * @throws { BusinessError } 11102005 - Invalid timeout value. Possible caused by the timeout value is less than zero. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 @@ -1840,11 +1963,13 @@ declare namespace hiAppEvent { * @returns { AppEventPackageHolder } Subscription data holder. If the subscription fails, null is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @throws { BusinessError } 11102002 - Invalid filtering event domain. - * @throws { BusinessError } 11102003 - Invalid row value. - * @throws { BusinessError } 11102004 - Invalid size value. - * @throws { BusinessError } 11102005 - Invalid timeout value. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102002 - Invalid filtering event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102003 - Invalid row value. Possible caused by the row value is less than zero. + * @throws { BusinessError } 11102004 - Invalid size value. Possible caused by the size value is less than zero. + * @throws { BusinessError } 11102005 - Invalid timeout value. Possible caused by the timeout value is less than zero. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice @@ -1857,16 +1982,19 @@ declare namespace hiAppEvent { * @returns { AppEventPackageHolder } Subscription data holder. If the subscription fails, null is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. - * @throws { BusinessError } 11102002 - Invalid filtering event domain. - * @throws { BusinessError } 11102003 - Invalid row value. - * @throws { BusinessError } 11102004 - Invalid size value. - * @throws { BusinessError } 11102005 - Invalid timeout value. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102002 - Invalid filtering event domain. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. + * @throws { BusinessError } 11102003 - Invalid row value. Possible caused by the row value is less than zero. + * @throws { BusinessError } 11102004 - Invalid size value. Possible caused by the size value is less than zero. + * @throws { BusinessError } 11102005 - Invalid timeout value. Possible caused by the timeout value is less than zero. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function addWatcher(watcher: Watcher): AppEventPackageHolder; @@ -1875,7 +2003,8 @@ declare namespace hiAppEvent { * * @param { Watcher } watcher Event watcher. * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 11102001 - Invalid watcher name. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 @@ -1886,7 +2015,8 @@ declare namespace hiAppEvent { * @param { Watcher } watcher Event watcher. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice @@ -1898,12 +2028,14 @@ declare namespace hiAppEvent { * @param { Watcher } watcher Event watcher. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. - * @throws { BusinessError } 11102001 - Invalid watcher name. + * @throws { BusinessError } 11102001 - Invalid watcher name. Possible causes: 1. Contain invalid characters; + *
2. Length is invalid. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function removeWatcher(watcher: Watcher): void; @@ -1929,7 +2061,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function clearData(): void; @@ -1960,7 +2093,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function setUserId(name: string, value: string): void; @@ -1989,7 +2123,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function getUserId(name: string): string; @@ -2020,7 +2155,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function setUserProperty(name: string, value: string): void; @@ -2049,7 +2185,8 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function getUserProperty(name: string): string; @@ -2059,7 +2196,8 @@ declare namespace hiAppEvent { * @interface AppEventReportConfig * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AppEventReportConfig { /** @@ -2070,7 +2208,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ domain?: string; @@ -2082,7 +2221,8 @@ declare namespace hiAppEvent { * @type { ?string } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -2093,7 +2233,8 @@ declare namespace hiAppEvent { * @type { ?boolean } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isRealTime?: boolean; } @@ -2270,7 +2411,7 @@ declare namespace hiAppEvent { * @arkts 1.1&1.2 */ customConfigs?: Record; - + /** * Initialize the processor by reading the configuration file based on the name. * @@ -2278,7 +2419,6 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ configName?: string; } @@ -2309,13 +2449,12 @@ declare namespace hiAppEvent { * @param { string } processorName The name of the processor. * @param { string } [configName] Initialize the processor by reading the configuration file based on the name. * @returns { Promise } The processor unique ID. - * @throws { BusinessError } 11105001 - Invalid parameter value. Possible causes: 1. Incorrect parameter length. + * @throws { BusinessError } 11105001 - Invalid parameter value. Possible causes: 1. Incorrect parameter length; *
2. Incorrect parameter format. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ function addProcessorFromConfig(processorName: string, configName?: string): Promise; @@ -2329,7 +2468,8 @@ declare namespace hiAppEvent { * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function removeProcessor(id: number): void; } diff --git a/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts b/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts index 745057c40a49e5abbefe8c2df55f997588d1f5c9..d4e1f95b159c96017e4f3f023926ce7add0c3e34 100644 --- a/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts +++ b/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts @@ -64,5 +64,27 @@ declare namespace jsLeakWatcher { * @since 12 */ function dump(filePath: string): Array; + + /** + * Enables or disables jsLeakWatcher. + * + * This interface can detect js object memory leaks in a single call, which is more concise than the previous method + * requiring four function (enable,watch,check dump) calls.If there is a memory leak, the leak file will be + * returned to the developer through the callback function. + * + * @param { boolean } isEnabled - Whether to enable or disable jsLeankWatcher. The value true means to enable the feature, and false means the opposite. + * @param { Array } configs - Array of types of objects to watch. + * @param { Callback> } callback - Callback invoked when an object-related memory leak is detected. + * @throws { BusinessError } 10801001 - The parameter isEnabled is invalid. + * @throws { BusinessError } 10801002 - The parameter config is invalid. + * @throws { BusinessError } 10801003 - The parameter callback is invalid. + * Input parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; + * 2.Incorrect parameter types; + * 3.Parameter verification failed. + * @syscap SystemCapability.HiviewDFX.HiChecker + * @since 20 + */ + function enableLeakWatcher(isEnabled: boolean, configs: Array, callback: Callback>): void } export default jsLeakWatcher; diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index 6b78d6c6d72aaa58e35acfcd4e7ed187715f06de..4916daeefbddf9ae075d934102ff4b9e82aba129 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -18,8 +18,10 @@ * @kit LocalizationKit */ +/*** if arkts 1.1&1.2 */ import { BusinessError } from './@ohos.base'; import intl from './@ohos.intl'; +/*** endif */ /** * Provides international settings related APIs. @@ -36,7 +38,7 @@ import intl from './@ohos.intl'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare namespace i18n { @@ -125,7 +127,7 @@ declare namespace i18n { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ export class System { @@ -170,7 +172,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string; @@ -215,7 +218,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string; @@ -232,7 +236,8 @@ declare namespace i18n { * @returns { Array } List of system languages. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getSystemLanguages(): Array; @@ -256,7 +261,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getSystemCountries(language: string): Array; @@ -285,7 +291,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static isSuggested(language: string, region?: string): boolean; @@ -312,7 +319,7 @@ declare namespace i18n { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ static getSystemLanguage(): string; @@ -329,7 +336,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static setSystemLanguage(language: string): void; @@ -355,7 +363,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ static getSystemRegion(): string; @@ -372,7 +380,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static setSystemRegion(region: string): void; @@ -398,8 +407,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 * @deprecated since 20 * @useinstead ohos.System.getSystemLocaleInstance */ @@ -414,6 +422,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static getSystemLocaleInstance(): Intl.Locale; @@ -431,23 +440,9 @@ declare namespace i18n { * @systemapi Hide this for inner system use. * @since 9 * @deprecated since 20 - * @useinstead ohos.System.setSystemLocaleInstance */ static setSystemLocale(locale: string): void; - /** - * Set the locale object currently used by the system. - * - * @permission ohos.permission.UPDATE_CONFIGURATION - * @param { Intl.Locale } locale - The locale to be used. It must be a valid locale. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the - * permission required tocall the API. - * @static - * @syscap SystemCapability.Global.I18n - * @since 20 - */ - static setSystemLocaleInstance(locale: Intl.Locale): void; - /** * Check out whether system is 24-hour system. * @@ -481,7 +476,7 @@ declare namespace i18n { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ static is24HourClock(): boolean; @@ -499,7 +494,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static set24HourClock(option: boolean): void; @@ -515,9 +511,11 @@ declare namespace i18n { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. + * @static * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static addPreferredLanguage(language: string, index?: number): void; @@ -531,9 +529,11 @@ declare namespace i18n { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. + * @static * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static removePreferredLanguage(index: number): void; @@ -550,7 +550,8 @@ declare namespace i18n { * @returns { Array } List of preferred languages. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getPreferredLanguageList(): Array; @@ -567,7 +568,8 @@ declare namespace i18n { * @returns { string } First language in the preferred language list. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getFirstPreferredLanguage(): string; @@ -606,6 +608,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static setAppPreferredLanguage(language: string): void; @@ -632,6 +635,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static getAppPreferredLanguage(): string; @@ -648,7 +652,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ static setUsingLocalDigit(flag: boolean): void; @@ -666,7 +671,8 @@ declare namespace i18n { * is enabled, and the value "false" indicates the opposite. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getUsingLocalDigit(): boolean; @@ -685,7 +691,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static getSimplifiedLanguage(language?: string): string; @@ -700,7 +707,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static setTemperatureType(type: TemperatureType): void; @@ -710,7 +718,8 @@ declare namespace i18n { * @returns { TemperatureType } Temperature unit. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static getTemperatureType(): TemperatureType; @@ -722,7 +731,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static getTemperatureName(type: TemperatureType): string; @@ -737,7 +747,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static setFirstDayOfWeek(type: WeekDay): void; @@ -747,7 +758,8 @@ declare namespace i18n { * @returns { WeekDay } Start day of a week. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static getFirstDayOfWeek(): WeekDay; @@ -820,7 +832,8 @@ declare namespace i18n { * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } identifier - Identifier of the measurement system. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -828,7 +841,7 @@ declare namespace i18n { * @systemapi * @since 20 */ - static setSystemMeasurement(identifier: string):void; + static setSystemMeasurement(identifier: string): void; /** * Gets numbering system currently used by system locale. @@ -840,14 +853,15 @@ declare namespace i18n { * @systemapi * @since 20 */ - static getUsingNumberingSystems(): string; + static getUsingNumberingSystem(): string; /** * Sets the numbering system used by the system locale. * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } identifier - Identifier of the numbering system. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -855,7 +869,7 @@ declare namespace i18n { * @systemapi * @since 20 */ - static setSystemNumberingSystem(identifier: string):void; + static setSystemNumberingSystem(identifier: string): void; /** * Gets numbering systems supported by system locale. @@ -887,7 +901,8 @@ declare namespace i18n { * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } pattern - Identifier of the number pattern. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -927,7 +942,8 @@ declare namespace i18n { * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } identifier - Identifier of the numerical date pattern. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @static @@ -956,7 +972,8 @@ declare namespace i18n { * @enum { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export enum WeekDay { /** @@ -964,7 +981,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MON = 1, @@ -973,7 +991,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TUE = 2, @@ -982,7 +1001,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ WED = 3, @@ -991,7 +1011,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ THU = 4, @@ -1000,7 +1021,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FRI = 5, @@ -1009,7 +1031,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SAT = 6, @@ -1018,7 +1041,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SUN = 7 } @@ -1029,7 +1053,8 @@ declare namespace i18n { * @enum { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export enum TemperatureType { /** @@ -1037,7 +1062,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CELSIUS = 1, @@ -1046,7 +1072,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ FAHRENHEIT = 2, @@ -1055,7 +1082,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ KELVIN = 3 } @@ -1107,7 +1135,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class I18NUtil { /** @@ -1134,9 +1163,11 @@ declare namespace i18n { * value is short. For details about the meaning or display effect of different values, * see Number and Unit of Measurement Formatting. * @returns { string } String converted to the measurement unit after formatting. + * @static * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string; @@ -1169,7 +1200,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getDateOrder(locale: string): string; @@ -1194,9 +1226,11 @@ declare namespace i18n { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. + * @static * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getTimePeriodName(hour:number, locale?: string): string; @@ -1214,7 +1248,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getBestMatchLocale(locale: string, localeList: string[]): string; @@ -1231,7 +1266,8 @@ declare namespace i18n { * @static * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getThreeLetterLanguage(locale: string): string; @@ -1248,7 +1284,8 @@ declare namespace i18n { * @static * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getThreeLetterRegion(locale: string): string; @@ -1257,8 +1294,8 @@ declare namespace i18n { * localization. * * @param { string } path - Path to mirror, for example, "/data/out/tmp". - * @param [ string ] delimiter - Path delimiter. The default value is "/"". - * @param [ intl.Locale ] locale - Locale object. The default value is the current system locale. + * @param { string } [delimiter] - Path delimiter. The default value is "/"". + * @param { intl.Locale } [locale] - Locale object. The default value is the current system locale. * @returns { string } File path after localization. If the specified locale object corresponds to an RTL language, * the processed file path contains a direction control character to ensure that the file path * is displayed in mirror mode. @@ -1268,18 +1305,20 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getUnicodeWrappedFilePath */ static getUnicodeWrappedFilePath(path: string, delimiter?: string, locale?: intl.Locale): string; /** - * Get the localized file path. - * Return the mirrored file path if the locale is RTL. Otherwise return the input file path. - * The default value of locale is current system locale. + * Localizes a file path for the specified locale. For example, /data/out/tmp is changed to tmp/out/data/ after + * localization. * - * @param { string } path - the file path that needs to be localized. - * @param [ string ] delimiter - the file path's delimiter. - * @param [ Intl.Locale ] locale - the locale object used to localized file path. - * @returns { string } the localized file path. + * @param { string } path - Path to mirror, for example, "/data/out/tmp". + * @param { string } [delimiter] - Path delimiter. The default value is "/"". + * @param { Intl.Locale } [locale] - Locale object. The default value is the current system locale. + * @returns { string } File path after localization. If the specified locale object corresponds to an RTL language, + * the processed file path contains a direction control character to ensure that the file path + * is displayed in mirror mode. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @static * @syscap SystemCapability.Global.I18n @@ -1302,7 +1341,8 @@ declare namespace i18n { * @interface UnitInfo * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface UnitInfo { /** @@ -1317,7 +1357,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unit: string; @@ -1333,7 +1374,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ measureSystem: string; } @@ -1360,7 +1402,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface PhoneNumberFormatOptions { /** @@ -1395,7 +1438,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type?: string; } @@ -1419,7 +1463,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class PhoneNumberFormat { /** @@ -1448,7 +1493,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(country: string, options?: PhoneNumberFormatOptions); @@ -1472,15 +1518,16 @@ declare namespace i18n { /** * Checks whether the phone number is valid for the country/region in the PhoneNumberFormat object. * - * @param { string } number - Phone number to be checked. + * @param { string } phoneNumber - Phone number to be checked. * @returns { boolean } Whether the phone number is valid. The value "true" indicates that the phone number is * valid, and the value "false" indicates the opposite. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - isValidNumber(number: string): boolean; + isValidNumber(phoneNumber: string): boolean; /** * Obtains the formatted phone number strings of number. @@ -1502,14 +1549,15 @@ declare namespace i18n { /** * Formats a phone number. * - * @param { string } number - Phone number to be formatted. + * @param { string } phoneNumber - Phone number to be formatted. * @returns { string } Formatted phone number. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - format(number: string): string; + format(phoneNumber: string): string; /** * Determine the location by phone number, and return it according to the specified regional language. @@ -1523,15 +1571,16 @@ declare namespace i18n { /** * Obtains the home location of a phone number. * - * @param { string } number - Phone number. To obtain the home location of a number in other countries/regions, + * @param { string } phoneNumber - Phone number. To obtain the home location of a number in other countries/regions, * you need to prefix the number with 00 and the country code. * @param { string } locale - System locale, which consists of the language, script, and country/region. * @returns { string } Home location of the phone number. If the number is invalid, an empty string is returned. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getLocationName(number: string, locale: string): string; + getLocationName(phoneNumber: string, locale: string): string; } /** @@ -1571,7 +1620,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export function getCalendar(locale: string, type?: string): Calendar; @@ -1595,7 +1644,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export class Calendar { @@ -1621,7 +1670,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTime(date: Date): void; @@ -1648,7 +1698,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTime(time: number): void; @@ -1689,9 +1740,10 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - set(year: number, month: number, date: number, hour?: number, minute?: number, second?: number): void; + set(year: number, month: number, date:number, hour?: number, minute?: number, second?: number): void; /** * Set the timezone of this calendar. @@ -1715,7 +1767,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTimeZone(timezone: string): void; @@ -1741,7 +1794,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ getTimeZone(): string; @@ -1768,7 +1821,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getFirstDayOfWeek(): number; @@ -1794,7 +1848,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setFirstDayOfWeek(value: number): void; @@ -1820,7 +1875,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMinimalDaysInFirstWeek(): number; @@ -1846,7 +1902,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMinimalDaysInFirstWeek(value: number): void; @@ -1880,7 +1937,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ get(field: string): number; @@ -1901,7 +1958,8 @@ declare namespace i18n { * Buddhist Calendar if the locale is en-US. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayName(locale: string): string; @@ -1934,7 +1992,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isWeekend(date?: Date): boolean; @@ -1963,7 +2022,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ add(field: string, amount: number): void; @@ -1983,7 +2043,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTimeInMillis(): number; @@ -2011,7 +2072,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ compareDays(date: Date): number; } @@ -2041,7 +2103,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export function isRTL(locale: string): boolean; @@ -2064,7 +2126,8 @@ declare namespace i18n { * @returns { BreakIterator } BreakIterator object. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export function getLineInstance(locale: string): BreakIterator; @@ -2079,7 +2142,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class BreakIterator { /** @@ -2095,7 +2159,8 @@ declare namespace i18n { * @returns { number } Position of the break iterator in the text. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ current(): number; @@ -2113,7 +2178,8 @@ declare namespace i18n { * @returns { number } Offset of the first line break point in the processed text. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ first(): number; @@ -2132,7 +2198,8 @@ declare namespace i18n { * @returns { number } Offset of the last line break point in the processed text. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ last(): number; @@ -2154,7 +2221,8 @@ declare namespace i18n { * position of the break iterator is outside of the processed text after movement. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ next(index?: number): number; @@ -2172,7 +2240,8 @@ declare namespace i18n { * position of the break iterator is outside of the processed text after movement. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previous(): number; @@ -2189,7 +2258,8 @@ declare namespace i18n { * @param { string } text - Input text. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setLineBreakText(text: string): void; @@ -2209,7 +2279,8 @@ declare namespace i18n { * position of the break iterator is outside of the processed text after movement. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ following(offset: number): number; @@ -2226,7 +2297,8 @@ declare namespace i18n { * @returns { string } Text being processed by the BreakIterator object. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLineBreakText(): string; @@ -2251,7 +2323,8 @@ declare namespace i18n { * specified by offset, which is equivalent to calling following. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isBoundary(offset: number): boolean; } @@ -2273,9 +2346,10 @@ declare namespace i18n { * @returns { IndexUtil } IndexUtil object created based on the specified locale ID. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - export function getInstance(locale?: string): IndexUtil; + export function getInstance(locale?:string): IndexUtil; /** * Sequence text can be grouped under the specified area, @@ -2290,7 +2364,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class IndexUtil { /** @@ -2306,7 +2381,8 @@ declare namespace i18n { * @returns { Array } Index list of the current locale. The first and last elements are "...". * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getIndexList(): Array; @@ -2323,7 +2399,8 @@ declare namespace i18n { * @param { string } locale - System locale, which consists of the language, script, and country/region. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addLocale(locale: string): void; @@ -2342,7 +2419,8 @@ declare namespace i18n { * @returns { string } Index of the text object. If no proper index is found, an empty string is returned. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getIndex(text: string): string; } @@ -2359,119 +2437,119 @@ declare namespace i18n { /** * Checks whether the input character is a digit. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character is a digit, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isDigit */ - isDigit(char: string): boolean; + isDigit(ch: string): boolean; /** * Checks whether the input character is a space. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character is a space, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isSpaceChar */ - isSpaceChar(char: string): boolean; + isSpaceChar(ch: string): boolean; /** * Checks whether the input character is a whitespace. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character is a white space, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isWhitespace */ - isWhitespace(char: string): boolean; + isWhitespace(ch: string): boolean; /** * Checks whether the input character is of the right to left (RTL) language. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character is of the RTL language, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isRTL */ - isRTL(char: string): boolean; + isRTL(ch: string): boolean; /** * Checks whether the input character is an ideographic character. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character an ideographic character, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isIdeograph */ - isIdeograph(char: string): boolean; + isIdeograph(ch: string): boolean; /** * Checks whether the input character is a letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character a letter, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isLetter */ - isLetter(char: string): boolean; + isLetter(ch: string): boolean; /** * Checks whether the input character is a lowercase letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character a lowercase letter, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isLowerCase */ - isLowerCase(char: string): boolean; + isLowerCase(ch: string): boolean; /** * Checks whether the input character is an uppercase letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { boolean } true if the input character an uppercase letter, and false otherwise. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.isUpperCase */ - isUpperCase(char: string): boolean; + isUpperCase(ch: string): boolean; /** * Obtains the type of the input character. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is - * checked. + * @param { string } ch - Input character. If the input is a string, only the type of the first character is + * checked. * @returns { string } Type of the input character. * @syscap SystemCapability.Global.I18n * @since 8 * @deprecated since 9 * @useinstead Unicode.getType */ - getType(char: string): string; + getType(ch: string): string; } /** @@ -2493,7 +2571,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export class Unicode { @@ -2517,15 +2595,17 @@ declare namespace i18n { /** * Checks whether the input character is a digit. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character is a digit, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isDigit(char: string): boolean; + static isDigit(ch: string): boolean; /** * Determines if the specified character is a space character or not. @@ -2547,15 +2627,17 @@ declare namespace i18n { /** * Checks whether the input character is a space. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character is a space, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isSpaceChar(char: string): boolean; + static isSpaceChar(ch: string): boolean; /** * Determines if the specified character is a whitespace character @@ -2577,15 +2659,17 @@ declare namespace i18n { /** * Checks whether the input character is a whitespace. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character is a white space, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isWhitespace(char: string): boolean; + static isWhitespace(ch: string): boolean; /** * Determines if the specified character is a RTL character or not. @@ -2614,7 +2698,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ static isRTL(ch: string): boolean; @@ -2639,15 +2723,17 @@ declare namespace i18n { /** * Checks whether the input character is an ideographic character. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character an ideographic character, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isIdeograph(char: string): boolean; + static isIdeograph(ch: string): boolean; /** * Determines if the specified character is a Letter or not. @@ -2669,15 +2755,17 @@ declare namespace i18n { /** * Checks whether the input character is a letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character a letter, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isLetter(char: string): boolean; + static isLetter(ch: string): boolean; /** * Determines if the specified character is a LowerCase character or not. @@ -2699,15 +2787,17 @@ declare namespace i18n { /** * Checks whether the input character is a lowercase letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character a lowercase letter, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isLowerCase(char: string): boolean; + static isLowerCase(ch: string): boolean; /** * Determines if the specified character is a UpperCase character or not. @@ -2729,15 +2819,17 @@ declare namespace i18n { /** * Checks whether the input character is an uppercase letter. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { boolean } true if the input character an uppercase letter, and false otherwise. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static isUpperCase(char: string): boolean; + static isUpperCase(ch: string): boolean; /** * Get the general category value of the specified character. @@ -2759,15 +2851,17 @@ declare namespace i18n { /** * Obtains the type of the input character. * - * @param { string } char - Input character. If the input is a string, only the type of the first character is + * @param { string } ch - Input character. If the input is a string, only the type of the first character is * checked. * @returns { string } Type of the input character. + * @static * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - static getType(char: string): string; + static getType(ch: string): string; } /** @@ -2871,7 +2965,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export function getTimeZone(zoneID?: string): TimeZone; @@ -2895,7 +2989,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ export class TimeZone { @@ -2921,7 +3015,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getID(): string; @@ -2945,7 +3040,8 @@ declare namespace i18n { * @returns { string } Time zone display name in the specified language. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDisplayName(locale?: string, isDST?: boolean): string; @@ -2971,7 +3067,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRawOffset(): number; @@ -3001,7 +3098,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getOffset(date?: number): number; @@ -3027,7 +3125,8 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getAvailableIDs(): Array; @@ -3044,7 +3143,8 @@ declare namespace i18n { * @returns { Array } List of time zone city IDs supported by the system. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getAvailableZoneCityIDs(): Array; @@ -3065,7 +3165,8 @@ declare namespace i18n { * @returns { string } Time zone city display name in the specified language. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getCityDisplayName(cityID: string, locale: string): string; @@ -3084,7 +3185,8 @@ declare namespace i18n { * @returns { TimeZone } TimeZone object corresponding to the specified time zone city ID. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getTimezoneFromCity(cityID: string): TimeZone; @@ -3099,7 +3201,6 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @since 10 */ - /** * Creates an array of TimeZone objects corresponding to the specified location. * @@ -3111,9 +3212,11 @@ declare namespace i18n { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. + * @static * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getTimezonesByLocation(longitude: number, latitude: number): Array; @@ -3198,7 +3301,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class Transliterator { /** @@ -3214,7 +3318,8 @@ declare namespace i18n { * @returns { string[] } List of IDs supported by the Transliterator object. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getAvailableIDs(): string[]; @@ -3235,7 +3340,8 @@ declare namespace i18n { * @returns { Transliterator } Transliterator object. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getInstance(id: string): Transliterator; @@ -3254,7 +3360,8 @@ declare namespace i18n { * @returns { string } Text after conversion. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ transform(text: string): string; } @@ -3272,7 +3379,8 @@ declare namespace i18n { * @enum { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum NormalizerMode { /** @@ -3286,7 +3394,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFC = 1, /** @@ -3300,7 +3409,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFD = 2, /** @@ -3314,7 +3424,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFKC = 3, /** @@ -3328,7 +3439,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NFKD = 4 } @@ -3344,7 +3456,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class Normalizer { /** @@ -3365,7 +3478,8 @@ declare namespace i18n { * 2.Incorrect parameter types. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getInstance(mode: NormalizerMode): Normalizer; @@ -3387,7 +3501,8 @@ declare namespace i18n { * 2.Incorrect parameter types. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ normalize(text: string): string; } @@ -3398,7 +3513,8 @@ declare namespace i18n { * @enum { number } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SuggestionType { /** @@ -3406,7 +3522,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SUGGESTION_TYPE_NONE = 0, /** @@ -3414,7 +3531,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SUGGESTION_TYPE_RELATED = 1, /** @@ -3422,7 +3540,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SUGGESTION_TYPE_SIM = 2, } @@ -3433,7 +3552,8 @@ declare namespace i18n { * @interface SortOptions * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface SortOptions { /** @@ -3443,7 +3563,8 @@ declare namespace i18n { * @type { ?string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ locale?: string; @@ -3455,7 +3576,8 @@ declare namespace i18n { * @type { ?boolean } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ isUseLocalName?: boolean; @@ -3467,7 +3589,8 @@ declare namespace i18n { * @type { ?boolean } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ isSuggestedFirst?: boolean; } @@ -3478,7 +3601,8 @@ declare namespace i18n { * @interface LocaleItem * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface LocaleItem { /** @@ -3487,7 +3611,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ id: string; @@ -3497,7 +3622,8 @@ declare namespace i18n { * @type { SuggestionType } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ suggestionType: SuggestionType; @@ -3507,16 +3633,19 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ displayName: string; /** * Local name of the ID. + * * @type { ?string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ localName?: string; } @@ -3527,7 +3656,8 @@ declare namespace i18n { * @interface TimeZoneCityItem * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TimeZoneCityItem { /** @@ -3536,7 +3666,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ zoneId: string; @@ -3546,7 +3677,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ cityId: string; @@ -3556,17 +3688,19 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ cityDisplayName: string; /** * Offset of the time zone ID. - * + * * @type { number } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ offset: number; @@ -3576,17 +3710,19 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ zoneDisplayName: string; /** * Fixed offset of the time zone ID. - * + * * @type { ?number } * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ rawOffset?: number; } @@ -3596,7 +3732,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export class SystemLocaleManager { /** @@ -3604,7 +3741,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3632,7 +3770,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLanguageInfoArray(languages: Array, options?: SortOptions): Array; @@ -3661,7 +3800,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRegionInfoArray(regions: Array, options?: SortOptions): Array; @@ -3680,7 +3820,8 @@ declare namespace i18n { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Global.I18n * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static getTimeZoneCityItemArray(): Array; } @@ -3698,7 +3839,8 @@ declare namespace i18n { * @interface HolidayInfoItem * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HolidayInfoItem { /** @@ -3714,7 +3856,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baseName: string; @@ -3731,7 +3874,8 @@ declare namespace i18n { * @type { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ year: number; @@ -3748,7 +3892,8 @@ declare namespace i18n { * @type { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ month: number; @@ -3765,7 +3910,8 @@ declare namespace i18n { * @type { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ day: number; @@ -3782,7 +3928,8 @@ declare namespace i18n { * @type { ?Array } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ localNames?: Array; } @@ -3800,7 +3947,8 @@ declare namespace i18n { * @interface HolidayLocalName * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HolidayLocalName { /** @@ -3816,7 +3964,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ language: string; @@ -3833,7 +3982,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; } @@ -3849,7 +3999,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class HolidayManager { /** @@ -3870,7 +4021,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(icsPath: String); @@ -3894,7 +4046,8 @@ declare namespace i18n { * 2.Incorrect parameter types. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHoliday(date?: Date): boolean; @@ -3919,7 +4072,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getHolidayInfoItemArray(year?: number): Array; } @@ -3937,7 +4091,8 @@ declare namespace i18n { * @interface EntityInfoItem * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface EntityInfoItem { /** @@ -3953,7 +4108,8 @@ declare namespace i18n { * @type { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ begin: number; @@ -3970,7 +4126,8 @@ declare namespace i18n { * @type { number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ end: number; @@ -3988,7 +4145,8 @@ declare namespace i18n { * @type { string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: string; } @@ -4004,7 +4162,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class EntityRecognizer { /** @@ -4027,7 +4186,8 @@ declare namespace i18n { * @throws { BusinessError } 890001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(locale?: string); @@ -4049,7 +4209,8 @@ declare namespace i18n { * 2.Incorrect parameter types. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ findEntityInfo(text: string): Array; } @@ -4069,16 +4230,20 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleDateTimeFormatByPattern */ export function getSimpleDateTimeFormatByPattern(pattern: string, locale?: intl.Locale): SimpleDateTimeFormat; /** - * Create a SimpleDateTimeFormat object by pattern and locale. - * The default value of locale is the current system locale. + * Obtains a SimpleDateTimeFormat object based on the specified pattern string. For details about the display + * differences between the objects obtained by this API and getSimpleDateTimeFormatBySkeleton, + * see SimpleDateTimeFormat. * - * @param { string } pattern - the pattern used to create SimpleDateTimeFormat object. - * @param [ Intl.Locale ] locale - the Intl.Locale object used to create Intl.SimpleDateTimeFormat object. - * @returns { SimpleDateTimeFormat } a SimpleDateTimeFormat object created from pattern. + * @param { string } pattern - Valid pattern. For details about the supported characters and their meanings, see + * [Date Field Symbol Table](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). + * This parameter also supports custom text enclosed in single quotation marks (''). + * @param { Intl.Locale } [locale] - Locale object. The default value is the current system locale. + * @returns { SimpleDateTimeFormat } SimpleDateTimeFormat object. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice @@ -4100,17 +4265,19 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleDateTimeFormatBySkeleton */ export function getSimpleDateTimeFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleDateTimeFormat; /** - * Create a SimpleDateTimeFormat object by skeleton and locale. This method create a pattern by locale and skeleton, the pattern - * includes locale specific separators, and the fields'order will be adjust for that locale. - * The default value of locale is the current system locale. + * Obtains a SimpleDateTimeFormat object based on the specified skeleton. For details about the display differences + * between the objects obtained by this API and getSimpleDateTimeFormatByPattern, see SimpleDateTimeFormat. * - * @param { string } skeleton - the skeleton used to create SimpleDateTimeFormat object. - * @param [ Intl.Locale ] locale - the Intl.Locale object used to create SimpleDateTimeFormat object. - * @returns { SimpleDateTimeFormat } a SimpleDateTimeFormat object created from skeleton. + * @param { string } skeleton - Valid skeleton. For details about the supported characters and their meanings, see + * [Date Field Symbol Table](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). + * This parameter does not support custom text. + * @param { Intl.Locale } [locale] - Locale object. The default value is the current system locale. + * @returns { SimpleDateTimeFormat } SimpleDateTimeFormat object. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @atomicservice @@ -4123,7 +4290,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export class SimpleDateTimeFormat { /** @@ -4133,7 +4301,8 @@ declare namespace i18n { * @returns { string } A string containing the formatted date and time. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ format(date: Date): string; } @@ -4151,16 +4320,17 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleNumberFormatBySkeleton */ export function getSimpleNumberFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleNumberFormat; /** - * Create a SimpleNumberFormat object by pattern and locale. - * The default value of locale is the current system locale. + * Obtains a SimpleNumberFormat object based on the specified skeleton. * - * @param { string } skeleton - the skeleton used to create SimpleNumberFormat object. - * @param [ Intl.Locale ] locale - the Intl.Locale object used to create SimpleNumberFormat object. - * @returns { SimpleNumberFormat } a SimpleNumberFormat object created from pattern. + * @param { string } skeleton - Valid skeleton. For details about the supported characters and their meanings, see + * [Number Skeletons](https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#number-skeletons). + * @param { Intl.Locale } [locale] - Locale object. The default value is the current system locale. + * @returns { SimpleNumberFormat } SimpleNumberFormat object. * @throws { BusinessError } 8900001 - Invalid parameter. Possible causes: Parameter verification failed. * @syscap SystemCapability.Global.I18n * @crossplatform @@ -4174,7 +4344,8 @@ declare namespace i18n { * * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export class SimpleNumberFormat { /** @@ -4184,7 +4355,8 @@ declare namespace i18n { * @returns { string } Formatted number. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ format(value: number): string; } @@ -4207,6 +4379,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead constructor */ constructor(numberFormat: intl.NumberFormat | SimpleNumberFormat, options?: StyledNumberFormatOptions); @@ -4284,4 +4457,4 @@ declare namespace i18n { unit?: TextStyle; } } -export default i18n; \ No newline at end of file +export default i18n; diff --git a/api/@ohos.inputMethod.d.ts b/api/@ohos.inputMethod.d.ts index f4e99ba13ca90f3ab24a8869c3e198d00eb5b900..33cbe85fee7fd04c24d37e7d1b9cb28a56fe54a7 100644 --- a/api/@ohos.inputMethod.d.ts +++ b/api/@ohos.inputMethod.d.ts @@ -65,7 +65,7 @@ declare namespace inputMethod { * * @returns { InputMethodSetting } the object of InputMethodSetting. * @throws { BusinessError } 12800007 - input method setter error. Possible cause: - * create InputmethodSetting object failed. + * create InputMethodSetting object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -76,7 +76,7 @@ declare namespace inputMethod { * * @returns { InputMethodController } the object of InputMethodController. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -699,8 +699,9 @@ declare namespace inputMethod { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - permissions check fails. * @throws { BusinessError } 202 - not system application. - * @throws { BusinessError } 12800008 - input method manager service error. - * @throws { BusinessError } 12800018 - the input method is not found. + * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: + * a system error, such as null pointer, IPC exception. + * @throws { BusinessError } 12800018 - the input method is not found. * @throws { BusinessError } 12800019 - current operation cannot be applied to the preconfigured default input method. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi @@ -769,7 +770,8 @@ declare namespace inputMethod { * Discard the typing text * * @returns { Promise } the promise returned by the function. - * @throws { BusinessError } 12800003 - input method client error. + * @throws { BusinessError } 12800003 - input method client error. Possible causes: + * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800009 - input method client detached. * @throws { BusinessError } 12800015 - the other side does not accept the request. * @syscap SystemCapability.MiscServices.InputMethodFramework diff --git a/api/@ohos.inputMethodEngine.d.ts b/api/@ohos.inputMethodEngine.d.ts index 5fc66ea191b98b174b095981adf9a37ded7cde66..f4e53a4544df80072c13cdd2f6844c8cf1be1267 100644 --- a/api/@ohos.inputMethodEngine.d.ts +++ b/api/@ohos.inputMethodEngine.d.ts @@ -179,6 +179,7 @@ declare namespace inputMethodEngine { /** * Editor of type PATTERN_USER_NAME * + * @constant * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 20 */ @@ -187,6 +188,7 @@ declare namespace inputMethodEngine { /** * Editor of type PATTERN_NEW_PASSWORD * + * @constant * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 20 */ @@ -195,6 +197,7 @@ declare namespace inputMethodEngine { /** * Editor of type PATTERN_NUMBER_DECIMAL * + * @constant * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 20 */ @@ -203,6 +206,7 @@ declare namespace inputMethodEngine { /** * Editor of type PATTERN_ONE_TIME_CODE * + * @constant * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 20 */ @@ -1120,7 +1124,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -1136,7 +1140,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -1152,7 +1156,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1168,7 +1172,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -1184,7 +1188,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 9 */ @@ -1200,7 +1204,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1370,7 +1374,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1384,7 +1388,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1397,7 +1401,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1413,7 +1417,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -1429,7 +1433,7 @@ declare namespace inputMethodEngine { * @throws { BusinessError } 12800003 - input method client error. Possible causes: * 1.the edit box is not focused. 2.no edit box is bound to current input method application. * @throws { BusinessError } 12800006 - input method controller error. Possible cause: - * create InputmethodController object failed. + * create InputMethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework * @since 10 */ @@ -2031,7 +2035,8 @@ declare namespace inputMethodEngine { *

It's only used for STATUS_BAR panel or SOFT_KEYBOARD panel with FLG_FLOATING or FLAG_CANDIDATE.

* * @throws { BusinessError } 801 - capability not supported. - * @throws { BusinessError } 12800002 - input method engine error. + * @throws { BusinessError } 12800002 - input method engine error. Possible causes: + * 1.input method panel not created. 2.the input method application does not subscribe to related events. * @throws { BusinessError } 12800013 - window manager service error. * @throws { BusinessError } 12800017 - invalid panel type or panel flag. * @syscap SystemCapability.MiscServices.InputMethodFramework diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index 445c96bea50d0b0c9bfd8a39e9dfc02f552a60e6..f7f6e5d1bb63e7e0bd9828506fed0fccc3087ce2 100644 --- a/api/@ohos.intl.d.ts +++ b/api/@ohos.intl.d.ts @@ -86,8 +86,9 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 20 + * @useinstead Intl.LocaleOptions */ export interface LocaleOptions { /** @@ -131,8 +132,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.calendar */ @@ -178,8 +178,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.collation */ @@ -224,8 +223,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.hourCycle */ @@ -275,8 +273,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.numberingSystem */ @@ -322,8 +319,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.numeric */ @@ -368,8 +364,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.LocaleOptions.caseFirst */ @@ -404,8 +399,9 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @deprecated since 20 + * @useinstead Intl.Locale */ export class Locale { /** @@ -436,10 +432,9 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 - * @useinstead i18n.System.getSystemLocaleObject + * @useinstead i18n.System.getSystemLocaleInstance */ constructor(); @@ -482,8 +477,7 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 20 * @useinstead Intl.Locale.constructor */ @@ -852,266 +846,6 @@ declare namespace intl { */ numeric: boolean; - /** - * Indicates the language of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get language(): string; - - /** - * Indicates the language of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set language(value: string); - - /** - * Indicates the script of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get script(): string; - - /** - * Indicates the script of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set script(value: string); - - /** - * Indicates the region of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get region(): string; - - /** - * Indicates the region of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set region(value: string); - - /** - * Indicates the baseName of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get baseName(): string; - - /** - * Indicates the baseName of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set baseName(value: string); - - /** - * Indicates the caseFirst of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get caseFirst(): string; - - /** - * Indicates the caseFirst of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set caseFirst(value: string); - - /** - * Indicates the calendar of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get calendar(): string; - - /** - * Indicates the calendar of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set calendar(value: string); - - /** - * Indicates the collation of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get collation(): string; - - /** - * Indicates the collation of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set collation(value: string); - - /** - * Indicates the hourCycle of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get hourCycle(): string; - - /** - * Indicates the hourCycle of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set hourCycle(value: string); - - /** - * Indicates the numberingSystem of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get numberingSystem(): string; - - /** - * Indicates the numberingSystem of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set numberingSystem(value: string); - - /** - * Indicates the numeric of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get numeric(): boolean; - - /** - * Indicates the numeric of the locale. - * - * @type { string } - * @syscap SystemCapability.Global.I18n - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set numeric(value: boolean); - /** * Convert the locale information to string. * @@ -1261,6 +995,8 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @deprecated since 20 + * @useinstead Intl.DateTimeFormatOptions * @arkts 1.1&1.2 */ export interface DateTimeOptions { @@ -1296,7 +1032,7 @@ declare namespace intl { * @since 11 */ /** - * Valid locale ID, for example, "zh-Hans-CN". The default value is the current system locale. + * Valid locale ID, for example, "zh-Hans-CN". The default value is the current system locale. * * @type { ?string } * @syscap SystemCapability.Global.I18n @@ -1304,9 +1040,8 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.locale + * @arkts 1.1&1.2 */ locale?: string; @@ -1350,9 +1085,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.dateStyle + * @useinstead Intl.DateTimeFormatOptions.dateStyle + * @arkts 1.1&1.2 */ dateStyle?: string; @@ -1396,9 +1131,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.timeStyle + * @useinstead Intl.DateTimeFormatOptions.timeStyle + * @arkts 1.1&1.2 */ timeStyle?: string; @@ -1434,7 +1169,7 @@ declare namespace intl { * @since 11 */ /** - * Hour cycle. The value can be: "h11", "h12", "h23", or "h24". + * Hour cycle. The value can be: "h11", "h12", "h23", or "h24". * * @type { ?string } * @syscap SystemCapability.Global.I18n @@ -1442,9 +1177,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.hourCycle + * @useinstead Intl.DateTimeFormatOptions.hourCycle + * @arkts 1.1&1.2 */ hourCycle?: string; @@ -1480,7 +1215,7 @@ declare namespace intl { * @since 11 */ /** - * Time zone in use. The value is a valid IANA time zone ID. + * Time zone in use. The value is a valid IANA time zone ID. * * @type { ?string } * @syscap SystemCapability.Global.I18n @@ -1488,9 +1223,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.timeZone + * @useinstead Intl.DateTimeFormatOptions.timeZone + * @arkts 1.1&1.2 */ timeZone?: string; @@ -1532,16 +1267,16 @@ declare namespace intl { * "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", * "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", * "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", or "wcho". - * + * * @type { ?string } * @syscap SystemCapability.Global.I18n * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.numberingSystem + * @useinstead Intl.DateTimeFormatOptions.numberingSystem + * @arkts 1.1&1.2 */ numberingSystem?: string; @@ -1587,9 +1322,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.hour12 + * @useinstead Intl.DateTimeFormatOptions.hour12 + * @arkts 1.1&1.2 */ hour12?: boolean; @@ -1633,9 +1368,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.weekday + * @useinstead Intl.DateTimeFormatOptions.weekday + * @arkts 1.1&1.2 */ weekday?: string; @@ -1679,9 +1414,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.era + * @useinstead Intl.DateTimeFormatOptions.era + * @arkts 1.1&1.2 */ era?: string; @@ -1725,9 +1460,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.year + * @useinstead Intl.DateTimeFormatOptions.year + * @arkts 1.1&1.2 */ year?: string; @@ -1771,9 +1506,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.month + * @useinstead Intl.DateTimeFormatOptions.month + * @arkts 1.1&1.2 */ month?: string; @@ -1817,9 +1552,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.day + * @useinstead Intl.DateTimeFormatOptions.day + * @arkts 1.1&1.2 */ day?: string; @@ -1863,9 +1598,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.hour + * @useinstead Intl.DateTimeFormatOptions.hour + * @arkts 1.1&1.2 */ hour?: string; @@ -1909,9 +1644,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.minute + * @useinstead Intl.DateTimeFormatOptions.minute + * @arkts 1.1&1.2 */ minute?: string; @@ -1955,9 +1690,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.second + * @useinstead Intl.DateTimeFormatOptions.second + * @arkts 1.1&1.2 */ second?: string; @@ -2001,9 +1736,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.timeZoneName + * @useinstead Intl.DateTimeFormatOptions.timeZoneName + * @arkts 1.1&1.2 */ timeZoneName?: string; @@ -2047,9 +1782,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.dayPeriod + * @useinstead Intl.DateTimeFormatOptions.dayPeriod + * @arkts 1.1&1.2 */ dayPeriod?: string; @@ -2095,9 +1830,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.localeMatcher + * @useinstead Intl.DateTimeFormatOptions.localeMatcher + * @arkts 1.1&1.2 */ localeMatcher?: string; @@ -2143,9 +1878,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 - * @useinstead Intl.DateTimeOptions.formatMatcher + * @useinstead Intl.DateTimeFormatOptions.formatMatcher + * @arkts 1.1&1.2 */ formatMatcher?: string; } @@ -2179,6 +1914,8 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} + * @deprecated since 20 + * @useinstead Intl.DateTimeFormat * @arkts 1.1&1.2 */ export class DateTimeFormat { @@ -2211,9 +1948,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 * @useinstead Intl.DateTimeFormat.constructor + * @arkts 1.1&1.2 */ constructor(); @@ -2259,9 +1996,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 * @useinstead Intl.DateTimeFormat.constructor + * @arkts 1.1&1.2 */ constructor(locale: string | Array, options?: DateTimeOptions); @@ -2302,9 +2039,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 * @useinstead Intl.DateTimeFormat.format + * @arkts 1.1&1.2 */ format(date: Date): string; @@ -2349,9 +2086,10 @@ declare namespace intl { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} * @deprecated since 20 * @useinstead Intl.DateTimeFormat.formatRange + * @arkts 1.1&1.2 */ formatRange(startDate: Date, endDate: Date): string; @@ -2388,9 +2126,9 @@ declare namespace intl { * @form * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 20 * @useinstead Intl.DateTimeFormat.resolvedOptions + * @arkts 1.1&1.2 */ resolvedOptions(): DateTimeOptions; } @@ -2453,8 +2191,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.locale */ locale?: string; @@ -2491,8 +2227,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.currency */ currency?: string; @@ -2527,8 +2261,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.currencySign */ currencySign?: string; @@ -2564,8 +2296,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.currencyDisplay */ currencyDisplay?: string; @@ -2603,8 +2333,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.unit */ unit?: string; @@ -2639,8 +2367,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.unitDisplay */ unitDisplay?: string; @@ -2680,7 +2406,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 */ unitUsage?: string; @@ -2720,8 +2445,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.signDisplay */ signDisplay?: string; @@ -2756,8 +2479,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.compactDisplay */ compactDisplay?: string; @@ -2793,8 +2514,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.notation */ notation?: string; @@ -2829,8 +2548,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.localeMatcher */ localeMatcher?: string; @@ -2866,8 +2583,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.style */ style?: string; @@ -2907,8 +2622,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.numberingSystem */ numberingSystem?: string; @@ -2944,8 +2657,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.useGrouping */ useGrouping?: boolean; @@ -2981,8 +2692,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumIntegerDigits */ minimumIntegerDigits?: number; @@ -3018,8 +2727,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumFractionDigits */ minimumFractionDigits?: number; @@ -3055,8 +2762,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.maximumFractionDigits */ maximumFractionDigits?: number; @@ -3091,8 +2796,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumSignificantDigits */ minimumSignificantDigits?: number; @@ -3127,8 +2830,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.maximumSignificantDigits */ maximumSignificantDigits?: number; @@ -3141,9 +2842,8 @@ declare namespace intl { * @type { ?string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.roundingPriority + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ roundingPriority?: string; @@ -3154,9 +2854,8 @@ declare namespace intl { * @type { ?number } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.roundingIncrement + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ roundingIncrement?: number; @@ -3183,9 +2882,8 @@ declare namespace intl { * @type { ?string } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.roundingMode + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ roundingMode?: string; } @@ -3234,8 +2932,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberFormat.constructor */ constructor(); @@ -3269,8 +2965,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberFormat.constructor */ constructor(locale: string | Array, options?: NumberOptions); @@ -3294,17 +2988,15 @@ declare namespace intl { /** * Formats a number. * - * @param { number } number - Number to be formatted. + * @param { number } num - Number to be formatted. * @returns { string } Formatted number. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberFormat.format */ - format(number: number): string; + format(num: number): string; /** * Formats a number range. @@ -3314,9 +3006,8 @@ declare namespace intl { * @returns { string } Formatted number range. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 - * @deprecated since 20 - * @useinstead Intl.NumberFormat.formatRange + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ formatRange(startRange: number, endRange: number): string; @@ -3344,8 +3035,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberFormat.resolvedOptions */ resolvedOptions(): NumberOptions; } @@ -3372,7 +3061,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface CollatorOptions { /** @@ -3409,8 +3099,6 @@ declare namespace intl { * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.localeMatcher */ localeMatcher?: string; @@ -3447,9 +3135,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.usage + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ usage?: string; @@ -3504,9 +3191,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.sensitivity + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ sensitivity?: string; @@ -3540,9 +3226,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.ignorePunctuation + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ignorePunctuation?: boolean; /** @@ -3576,9 +3261,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.collation + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ collation?: string; @@ -3612,9 +3296,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.numeric + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ numeric?: boolean; @@ -3651,9 +3334,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.CollatorOptions.caseFirst + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ caseFirst?: string; } @@ -3677,7 +3359,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export class Collator { /** @@ -3699,9 +3382,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.Collator.constructor + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** @@ -3732,9 +3414,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.Collator.constructor + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(locale: string | Array, options?: CollatorOptions); @@ -3774,9 +3455,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.Collator.compare + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ compare(first: string, second: string): number; @@ -3804,9 +3484,8 @@ declare namespace intl { * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 - * @deprecated since 20 - * @useinstead Intl.Collator.resolvedOptions + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ resolvedOptions(): CollatorOptions; } @@ -3834,6 +3513,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.PluralRulesOptions */ export interface PluralRulesOptions { /** @@ -3898,7 +3579,7 @@ declare namespace intl { */ /** * Collation type. The value can be "cardinal" or "ordinal". The default value is "cardinal". The value "cardinal" - * indicates a cardinal number and the value "ordinal" indicates an ordinal number. + * indicates a cardinal number and the value "ordinal" indicates an ordinal number. * * @type { ?string } * @syscap SystemCapability.Global.I18n @@ -4127,6 +3808,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.PluralRules */ export class PluralRules { /** @@ -4247,6 +3930,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.RelativeTimeFormatOptions */ export interface RelativeTimeFormatInputOptions { /** @@ -4283,7 +3968,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatInputOptions.localeMatcher + * @useinstead Intl.RelativeTimeFormatOptions.localeMatcher */ localeMatcher?: string; @@ -4321,7 +4006,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatInputOptions.numeric + * @useinstead Intl.RelativeTimeFormatOptions.numeric */ numeric?: string; @@ -4360,7 +4045,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatInputOptions.style + * @useinstead Intl.RelativeTimeFormatOptions.style */ style?: string; } @@ -4388,6 +4073,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.ResolvedRelativeTimeFormatOptions */ export interface RelativeTimeFormatResolvedOptions { /** @@ -4412,7 +4099,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatResolvedOptions.locale + * @useinstead Intl.ResolvedRelativeTimeFormatOptions.locale */ locale: string; @@ -4440,7 +4127,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatResolvedOptions.style + * @useinstead Intl.ResolvedRelativeTimeFormatOptions.style */ style: string; @@ -4468,7 +4155,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatResolvedOptions.numeric + * @useinstead Intl.ResolvedRelativeTimeFormatOptions.numeric */ numeric: string; @@ -4499,7 +4186,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead Intl.RelativeTimeFormatResolvedOptions.numberingSystem + * @useinstead Intl.ResolvedRelativeTimeFormatOptions.numberingSystem */ numberingSystem: string; } @@ -4527,6 +4214,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.RelativeTimeFormat */ export class RelativeTimeFormat { /** @@ -4695,4 +4384,4 @@ declare namespace intl { resolvedOptions(): RelativeTimeFormatResolvedOptions; } } -export default intl; \ No newline at end of file +export default intl; diff --git a/api/@ohos.logLibrary.d.ts b/api/@ohos.logLibrary.d.ts index e73e661afa5b3855155c5924d6a7a5e407619940..f6ce0a56bcc9bad5932eee6360696d235cf55bd4 100644 --- a/api/@ohos.logLibrary.d.ts +++ b/api/@ohos.logLibrary.d.ts @@ -24,7 +24,8 @@ import type { AsyncCallback } from './@ohos.base'; * @namespace logLibrary * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace logLibrary { /** @@ -33,7 +34,8 @@ declare namespace logLibrary { * @typedef LogEntry * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface LogEntry { /** @@ -42,7 +44,8 @@ declare namespace logLibrary { * @type { string } * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -52,7 +55,8 @@ declare namespace logLibrary { * @type { number } * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ mtime: number; @@ -62,7 +66,8 @@ declare namespace logLibrary { * @type { number } * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ size: number; } @@ -81,7 +86,8 @@ declare namespace logLibrary { *
3. Parameter verification failed. * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function list(logType: string): LogEntry[]; @@ -102,7 +108,8 @@ declare namespace logLibrary { * @throws { BusinessError } 21300001 - Source file does not exists * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function copy(logType: string, logName: string, dest: string): Promise; @@ -123,7 +130,8 @@ declare namespace logLibrary { * @throws { BusinessError } 21300001 - Source file does not exists * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function copy(logType: string, logName: string, dest: string, callback: AsyncCallback): void; @@ -144,7 +152,8 @@ declare namespace logLibrary { * @throws { BusinessError } 21300001 - Source file does not exists * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function move(logType: string, logName: string, dest: string): Promise; @@ -165,7 +174,8 @@ declare namespace logLibrary { * @throws { BusinessError } 21300001 - Source file does not exists * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function move(logType: string, logName: string, dest: string, callback: AsyncCallback): void; @@ -184,7 +194,8 @@ declare namespace logLibrary { * @throws { BusinessError } 21300001 - Source file does not exists * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function remove(logType: string, logName: string): void; } diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index ebf524195c484a3603b3f9253584ebd80ac08733..96ffc1d56127e04b51b427f83fbfbf6252590525 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -40,7 +40,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace matrix4 { /** @@ -65,9 +66,10 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface TranslateOption { + export interface TranslateOption { /** * Indicates the translation distance of the x-axis, in px. * @@ -93,7 +95,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -122,7 +125,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -151,7 +155,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number; } @@ -178,9 +183,10 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface ScaleOption { + export interface ScaleOption { /** * Zoom factor of the x-axis. * @@ -207,7 +213,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -237,7 +244,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -267,7 +275,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number; @@ -296,7 +305,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerX?: number; @@ -325,7 +335,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerY?: number; } @@ -352,9 +363,10 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface RotateOption { + export interface RotateOption { /** * Axis of rotation vector x coordinate. * @@ -379,7 +391,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ x?: number; @@ -407,7 +420,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ y?: number; @@ -436,7 +450,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ z?: number; @@ -467,7 +482,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerX?: number; @@ -498,7 +514,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ centerY?: number; @@ -525,7 +542,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ angle?: number; } @@ -538,7 +556,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Point { @@ -549,7 +568,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ x: number; @@ -560,7 +580,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ y: number; } @@ -572,7 +593,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface PolyToPolyOptions { @@ -583,7 +605,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ src: Array; @@ -594,7 +617,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ srcIndex?: number; @@ -605,7 +629,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dst:Array; @@ -617,7 +642,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dstIndex?: number; @@ -631,20 +657,21 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pointCount?:number; } /** - * Implements a **Matrix4Transit** object. + * Matrix4Transit. * * @interface Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Implements a **Matrix4Transit** object. + * Matrix4Transit. * * @interface Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -652,15 +679,16 @@ declare namespace matrix4 { * @since 10 */ /** - * Implements a **Matrix4Transit** object. + * Matrix4Transit. * * @interface Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - interface Matrix4Transit { + export interface Matrix4Transit { /** * Copy function of Matrix, which can copy a copy of the current matrix object. * @@ -677,13 +705,14 @@ declare namespace matrix4 { * @since 10 */ /** - * Copies this matrix object. + * Copy function of Matrix, which can copy a copy of the current matrix object. * - * @returns { Matrix4Transit } Copy object of the current matrix. + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ copy(): Matrix4Transit; @@ -703,13 +732,14 @@ declare namespace matrix4 { * @since 10 */ /** - * Inverts this matrix object. The original matrix that calls this API will be changed. + * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. * - * @returns { Matrix4Transit } Inverse matrix object of the current matrix. + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ invert(): Matrix4Transit; @@ -731,14 +761,15 @@ declare namespace matrix4 { * @since 10 */ /** - * Combines the effects of two matrices to generate a new matrix object. The original matrix that calls this API will be changed. + * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. * - * @param { Matrix4Transit } options - Matrix object to be combined. - * @returns { Matrix4Transit } Object after matrix combination. + * @param { Matrix4Transit } options + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ combine(options: Matrix4Transit): Matrix4Transit; @@ -760,14 +791,15 @@ declare namespace matrix4 { * @since 10 */ /** - * Translates this matrix object along the x, y, and z axes. The original matrix that calls this API will be changed. + * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. * - * @param { TranslateOption } options - Translation configuration. - * @returns { Matrix4Transit } Matrix object after the translation. + * @param { TranslateOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ translate(options: TranslateOption): Matrix4Transit; @@ -789,27 +821,31 @@ declare namespace matrix4 { * @since 10 */ /** - * Scales this matrix object along the x, y, and z axes. The matrix that calls this API will be changed. + * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. * - * @param { ScaleOption } options - Scaling configuration. - * @returns { Matrix4Transit } Matrix object after the scaling. + * @param { ScaleOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ scale(options: ScaleOption): Matrix4Transit; /** - * Skews this matrix object along the x and y axes. The matrix that calls this API will be changed. + * Skew function of the Matrix, which can add the x-axis, y-axis skew effect to the current matrix. + * Skew function takes a generic point with coordinates (x0, y0, z0) to the point (x0 + x*y0, y0 + y*x0, z0), + * where x, y are fixed parameters, called the shear factors. * - * @param { number } x - Amount of skewing on the x-axis. - * @param { number } y - Amount of skewing on the y-axis. - * @returns { Matrix4Transit } Matrix object after the skewing. + * @param { number } x - the shear factor of x-axis. + * @param { number } y - the shear factor of y-axis. + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ skew(x: number, y: number): Matrix4Transit; @@ -831,14 +867,15 @@ declare namespace matrix4 { * @since 10 */ /** - * Rotates this matrix object along the x, y, and z axes. The matrix that calls this API will be changed. + * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. * - * @param { RotateOption } options - Rotation configuration. - * @returns { Matrix4Transit } Matrix object after the rotation. + * @param { RotateOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ rotate(options: RotateOption): Matrix4Transit; @@ -860,14 +897,15 @@ declare namespace matrix4 { * @since 10 */ /** - * Applies the current transformation effect to a coordinate point. + * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. * - * @param { [number, number] } options - Point to be transformed. - * @returns { [number, number] } Point object after matrix transformation + * @param { [number, number] } options + * @returns { [number, number] } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ transformPoint(options: [number, number]): [number, number]; @@ -879,10 +917,10 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit - + setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit; } /** @@ -975,7 +1013,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function init( options: [ @@ -1020,7 +1059,8 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function identity(): Matrix4Transit; diff --git a/api/@ohos.measure.d.ets b/api/@ohos.measure.d.ets deleted file mode 100644 index 617503d81be79cc7b123421e8027a5ba4479bbd4..0000000000000000000000000000000000000000 --- a/api/@ohos.measure.d.ets +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { FontStyle, FontWeight, TextAlign, TextOverflow, TextCase, WordBreak } from './arkui/component/enums' -import { SizeOptions } from './arkui/component/units'; -import { Resource } from './global/resource' - -/** - * Defines the options of MeasureText. - * - * @interface MeasureOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * Defines the options of MeasureText. - * - * @interface MeasureOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Defines the options of MeasureText. - * - * @interface MeasureOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export interface MeasureOptions { - /** - * Text to display. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Text to display. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Text to display. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textContent: string | Resource; - - /** - * Text display area of width. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Text display area of width. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constraintWidth?: number | string | Resource; - - /** - * Font Size. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Font Size. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontSize?: number | string | Resource; - - /** - * Font style. - * - * @type { ?(number | FontStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Font style. - * - * @type { ?(number | FontStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontStyle?: number | FontStyle; - - /** - * Font weight. - * - * @type { ?(number | string | FontWeight) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Font weight. - * - * @type { ?(number | string | FontWeight) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontWeight?: number | string | FontWeight; - - /** - * Font list of text. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Font list of text. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fontFamily?: string | Resource; - - /** - * Distance between text fonts. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Distance between text fonts. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - letterSpacing?: number | string; - - /** - * Alignment of text. - * - * @type { ?(number | TextAlign) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Alignment of text. - * - * @type { ?(number | TextAlign) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textAlign?: number | TextAlign; - - /** - * Overflow mode of the font. - * - * @type { ?(number | TextOverflow) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Overflow mode of the font. - * - * @type { ?(number | TextOverflow) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - overflow?: number | TextOverflow; - - /** - * Maximum number of lines of text. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Maximum number of lines of text. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - maxLines?: number; - - /** - * Vertical center mode of the font. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Vertical center mode of the font. - * - * @type { ?(number | string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - lineHeight?: number | string | Resource; - - /** - * Baseline offset. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Baseline offset. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - baselineOffset?: number | string; - - /** - * Type of letter in the text font - * - * @type { ?(number | TextCase) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Type of letter in the text font - * - * @type { ?(number | TextCase) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textCase?: number | TextCase; - - /** - * Specify the indentation of the first line in a text-block. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Specify the indentation of the first line in a text-block. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textIndent?: number | string; - - /** - * Set the word break type. - * - * @type { ?WordBreak } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Set the word break type. - * - * @type { ?WordBreak } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - wordBreak?: WordBreak; -} - -/** - * Defines the Measure interface. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * Defines the Measure interface. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -export declare class MeasureText { - /** - * Displays the textWidth. - * - * @param { MeasureOptions } options - Options. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Displays the textWidth. - * - * @param { MeasureOptions } options - Options. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Displays the textWidth. - * - * @param { MeasureOptions } options - Options. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static measureText(options: MeasureOptions): number; - - /** - * Displays the text width and height. - * - * @param { MeasureOptions } options - Options of measure area occupied by text. - * @returns { SizeOptions } width and height for text to display \ - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Displays the text width and height. - * - * @param { MeasureOptions } options - Options of measure area occupied by text. - * @returns { SizeOptions } width and height for text to display \ - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Displays the text width and height. - * - * @param { MeasureOptions } options - Options of measure area occupied by text. - * @returns { SizeOptions } width and height for text to display \ - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - static measureTextSize(options: MeasureOptions): SizeOptions; -} diff --git a/api/@ohos.measure.d.ts b/api/@ohos.measure.d.ts index 8418f45f655549d87596938803983727d64e2858..4df04ccd50f063a9bf987b413ed4ba8aba399d4f 100644 --- a/api/@ohos.measure.d.ts +++ b/api/@ohos.measure.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { FontStyle, FontWeight, TextAlign, TextOverflow, TextCase, WordBreak } from './arkui/component/enums' +import { SizeOptions } from './arkui/component/units'; +import { Resource } from './global/resource' +/*** endif */ /** * Defines the options of MeasureText. @@ -41,7 +46,8 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MeasureOptions { /** @@ -65,7 +71,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textContent: string | Resource; @@ -83,7 +90,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constraintWidth?: number | string | Resource; @@ -101,7 +109,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontSize?: number | string | Resource; @@ -119,7 +128,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontStyle?: number | FontStyle; @@ -137,7 +147,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontWeight?: number | string | FontWeight; @@ -155,7 +166,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fontFamily?: string | Resource; @@ -173,7 +185,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ letterSpacing?: number | string; @@ -191,7 +204,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textAlign?: number | TextAlign; @@ -209,7 +223,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ overflow?: number | TextOverflow; @@ -227,7 +242,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ maxLines?: number; @@ -245,7 +261,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lineHeight?: number | string | Resource; @@ -263,7 +280,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ baselineOffset?: number | string; @@ -281,7 +299,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textCase?: number | TextCase; @@ -300,7 +319,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textIndent?: number | string; @@ -319,7 +339,8 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ wordBreak?: WordBreak; } diff --git a/api/@ohos.mediaquery.d.ts b/api/@ohos.mediaquery.d.ts index eea1e126235de20fe746504523c520a9bae251c5..c1bce4bc321ce06a9bc2f15a983ed6f261084ce5 100644 --- a/api/@ohos.mediaquery.d.ts +++ b/api/@ohos.mediaquery.d.ts @@ -18,7 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.1 */ import { Callback } from './@ohos.base'; +/*** endif */ + +/*** if arkts 1.2 */ +import { Callback } from './@ohos.base'; +/*** endif */ /** * Used to do mediaquery operations. @@ -52,7 +58,8 @@ import { Callback } from './@ohos.base'; * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ declare namespace mediaquery { @@ -88,7 +95,8 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ interface MediaQueryResult { /** @@ -131,7 +139,8 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ readonly matches: boolean; @@ -175,7 +184,8 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ readonly media: string; } @@ -216,7 +226,8 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ interface MediaQueryListener extends MediaQueryResult { /** @@ -259,13 +270,14 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ on(type: 'change', callback: Callback): void; /** * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. + * This callback is not triggered when the media attributes change. * * @param { 'change' } type * @param { Callback } callback @@ -274,7 +286,7 @@ declare namespace mediaquery { */ /** * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. + * This callback is not triggered when the media attributes change. * * @param { 'change' } type * @param { Callback } callback @@ -284,7 +296,7 @@ declare namespace mediaquery { */ /** * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. + * This callback is not triggered when the media attributes change. * * @param { 'change' } type * @param { Callback } callback @@ -295,7 +307,7 @@ declare namespace mediaquery { */ /** * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. + * This callback is not triggered when the media attributes change. * * @param { 'change' } type * @param { Callback } callback @@ -303,7 +315,8 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts { '1.1':'12','1.2':'20' } + * @arkts 1.1&1.2 */ off(type: 'change', callback?: Callback): void; } diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 51e751d8c421d758c9fd1610614bd1937165cf64..7a6fa87c0519dee78bcf5bd39587f83cf290496f 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -159,7 +159,7 @@ declare namespace audio { *

NOTE: * The {@link AudioManager} instance is not a singleton. *

- * + * * @returns { AudioManager } this {@link AudioManager} object. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform @@ -230,9 +230,9 @@ declare namespace audio { * * Application developer should also be careful when app goes to background, please check if your audio playback * is still needed, see **Audio Resources** in best practices document. - * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take + * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take * control measures when this behavior is detected, see **Audio Playback** in best practices document. - * + * * If you want to use AudioRenderer api to implement a music playback application, there are also many interactive * scenes to consider, see **Developing an Audio Application** in best practices document. * @@ -255,7 +255,7 @@ declare namespace audio { /** * Obtains an {@link AudioRenderer} instance. * This method uses a promise to return the renderer instance. - * + * * The AudioRenderer instance is used to play streaming audio data. * When using AudioRenderer apis, there are many instructions for application * to achieve better performance and lower power consumption: @@ -265,9 +265,9 @@ declare namespace audio { * * Application developer should also be careful when app goes to background, please check if your audio playback * is still needed, see **Audio Resources** in best practices document. - * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take + * And avoiding to send silence audio data continuously to waste system resources, otherwise system will take * control measures when this behavior is detected, see **Audio Playback** in best practices document. - * + * * If you want to use AudioRenderer api to implement a music playback application, there are also many interactive * scenes to consider, see **Developing an Audio Application** in best practices document. * @@ -462,6 +462,66 @@ declare namespace audio { AVAILABLE_RUNNING = 1, } + /** + * Enumerates audio loopback reverberation preset. + * @enum { number } + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + enum AudioLoopbackReverbPreset { + /** + * A preset that keep the original reverberation without any enhancement. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + ORIGINAL = 1, + /** + * A preset representing a reverberation effect with karaoke-like acoustic characteristics. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + KTV = 2, + /** + * A preset representing a reverberation effect with theater-like acoustic characteristics. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + THEATER = 3, + /** + * A preset representing a reverberation effect with concert-like acoustic characteristics. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + CONCERT = 4, + } + + /** + * Enumerates audio loopback equalizer preset. + * @enum { number } + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + enum AudioLoopbackEqualizerPreset { + /** + * A preset that keep the original frequency response without any enhancement. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + FLAT = 1, + /** + * A preset representing a equalizer that can enhance the fullness of the vocie + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + FULL = 2, + /** + * A preset representing a equalizer that can enhance the brightness of the vocie + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + BRIGHT = 3, + } + /** * Enumerates audio stream types. * @enum { number } @@ -506,7 +566,7 @@ declare namespace audio { * @since 7 */ /** - * Audio volume type for media purpose. + * Audio volume type for media purpose. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 @@ -536,6 +596,13 @@ declare namespace audio { * @since 12 */ ACCESSIBILITY = 5, + /** + * Audio volume for system sound. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + */ + SYSTEM = 6, /** * Audio volume type for voice assistant. * @syscap SystemCapability.Multimedia.Audio.Volume @@ -919,6 +986,12 @@ declare namespace audio { * @since 18 */ REMOTE_DAUDIO = 29, + /** + * Hearing aid audio device. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + HEARING_AID = 30, /** * Nearlink Device. * @syscap SystemCapability.Multimedia.Audio.Device @@ -1656,7 +1729,7 @@ declare namespace audio { * @since 7 */ /** - * Used for network voice call, such as WeChat voice call, QQ voice call, etc. + * Voice communication usage. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice @@ -1829,7 +1902,7 @@ declare namespace audio { */ STREAM_USAGE_ULTRASONIC = 16, /** - * Used for network video call. + * Video communication or video conference usage. * @syscap SystemCapability.Multimedia.Audio.Core * @atomicservice * @since 12 @@ -4411,6 +4484,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive */ isActive(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -4429,6 +4504,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive */ isActive(volumeType: AudioVolumeType): Promise; /** @@ -4453,6 +4530,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive */ isActiveSync(volumeType: AudioVolumeType): boolean; @@ -4468,7 +4547,8 @@ declare namespace audio { /** * Checks whether the specified audio source type supports echo cancellation * @param { SourceType } sourceType Type of audio source. - * @returns { boolean } Check result. The value true means that the audio source type supports echo cancellation, and false means the opposite. + * @returns { boolean } Check result. The value true means that the audio source type supports echo + * cancellation, and false means the opposite. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 20 @@ -4561,6 +4641,104 @@ declare namespace audio { DEACTIVATED_TIMEOUT = 1, } + /** + * Audio session scene. + * @enum { number } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + enum AudioSessionScene { + /** + * Scene for media. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_SCENE_MEDIA = 0, + /** + * Scene for game. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_SCENE_GAME = 1, + /** + * Scene for voice communication. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_SCENE_VOICE_COMMUNICATION = 2, + } + + /** + * Enumerates the session state change hints. + * @enum { number } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + enum AudioSessionStateChangeHint { + /** + * Resume the playback. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_RESUME = 0, + + /** + * Paused/Pause the playback. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_PAUSE = 1, + + /** + * Stopped/Stop the playback due to focus priority. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_STOP = 2, + + /** + * Stopped/Stop the playback due to no audio stream for a long time. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_TIME_OUT_STOP = 3, + + /** + * Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.) + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_DUCK = 4, + + /** + * Unducked the playback. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + AUDIO_SESSION_STATE_CHANGE_HINT_UNDUCK = 5, + } + + /** + * Enumerates the recommend action when device change. + * @enum { number } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + enum OutputDeviceChangeRecommendedAction { + /** + * Recommend to continue the playback. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + DEVICE_CHANGE_RECOMMEND_TO_CONTINUE = 0, + /** + * Recommend to stop the playback. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + DEVICE_CHANGE_RECOMMEND_TO_STOP = 1, + } + /** * Audio session strategy. * @typedef AudioSessionStrategy @@ -4597,6 +4775,52 @@ declare namespace audio { reason: AudioSessionDeactivatedReason; } + /** + * Audio session state change event. + * @typedef AudioSessionStateChangedEvent + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + interface AudioSessionStateChangedEvent { + /** + * Audio session state change hints. + * @type { AudioSessionStateChangeHint } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + stateChangeHint: AudioSessionStateChangeHint; + } + + /** + * Audio session device change info. + * @typedef CurrentOutputDeviceChangedEvent + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + interface CurrentOutputDeviceChangedEvent { + /** + * Audio device descriptors after change. + * @type { AudioDeviceDescriptors } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + devices: AudioDeviceDescriptors; + /** + * Audio device change reason. + * @type { AudioStreamDeviceChangeReason } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + changeReason: AudioStreamDeviceChangeReason; + /** + * Recommend action when device change. + * @type { OutputDeviceChangeRecommendedAction } + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + recommendedAction: OutputDeviceChangeRecommendedAction; + } + /** * Implements audio session management. * @typedef AudioSessionManager @@ -4607,6 +4831,7 @@ declare namespace audio { interface AudioSessionManager { /** * Activate the audio session for the current pid application. + * If {@link setAudioSessionScene} is called, it will take focus when calling this method. * @param { AudioSessionStrategy } strategy - Audio session strategy. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -4667,6 +4892,98 @@ declare namespace audio { * @since 12 */ off(type: 'audioSessionDeactivated', callback?: Callback): void; + + /** + * Set scene for audio session. + * @param { AudioSessionScene } scene - Audio session scene. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800103 - Operation not permit at current state. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + setAudioSessionScene(scene: AudioSessionScene): void; + + /** + * Listens for audio session state change event. When the audio session state change, + * registered clients will receive the callback. + * @param { 'audioSessionStateChanged' } type - Type of the event to listen for. + * Only the audioSessionStateChanged event is supported. + * @param { Callback } callback - Callback invoked for the audio session state change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800102 - Allocate memory failed. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + on(type: 'audioSessionStateChanged', callback: Callback): void; + + /** + * Unsubscribes to audio session deactivated event. + * @param { 'audioSessionStateChanged' } type - Type of the event to listen for. + * Only the audioSessionStateChanged event is supported. + * @param { Callback } [callback] - Callback invoked for the audio session state change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Core + * @since 20 + */ + off(type: 'audioSessionStateChanged', callback?: Callback): void; + + /** + * Gets the default output device. + * @returns { DeviceType } - the available deviceTypes are + * EARPIECE: Built-in earpiece + * SPEAKER: Built-in speaker + * DEFAULT: System default output device + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800103 - Operation not permit at current state. Return by promise. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + getDefaultOutputDevice(): DeviceType; + + /** + * Temporarily changes the current audio device + * This function applys on audiorenderers whose StreamUsage are + * STREAM_USAGE_VOICE_COMMUNICATION/STREAM_USAGE_VIDEO_COMMUNICATION/STREAM_USAGE_VOICE_MESSAGE. + * Setting the device will only takes effect if no other accessory such as headphones are in use + * @param { DeviceType } deviceType - the available deviceTypes are + * EARPIECE: Built-in earpiece + * SPEAKER: Built-in speaker + * DEFAULT: System default output device + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. + * @throws { BusinessError } 6800102 - Allocate memory failed. Return by promise. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + setDefaultOutputDevice(deviceType: DeviceType): Promise; + + /** + * Subscribes output device change event callback. + * The event is triggered when device change. + * @param { 'currentOutputDeviceChanged' } type - Type of the event to listen for. + * @param { Callback } callback - Callback used to listen device change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800102 - Allocate memory failed. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + on(type: 'currentOutputDeviceChanged', callback: Callback): void; + + /** + * UnSubscribes output device change event callback. + * @param { 'currentOutputDeviceChanged' } type - Type of the event to listen for. + * @param { Callback } [callback] - Callback used to listen device change event. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Audio client call audio service error, System error. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + off(type: 'currentOutputDeviceChanged', callback?: Callback): void; } /** @@ -4869,6 +5186,37 @@ declare namespace audio { */ setAppVolumePercentage(volume: number): Promise; + /** + * Sets the volume for a stream. This method uses a promise to return the result. + * @permission ohos.permission.ACCESS_NOTIFICATION_POLICY + * @param { AudioVolumeType } volumeType - Audio stream type. + * @param { number } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. + * @param { number } callingUid - Uid of the stream owner. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + */ + setSystemVolumeByUid(volumeType: AudioVolumeType, volume: number, callingUid: number): Promise; + + /** + * Obtains the volume of a stream. + * @param { AudioVolumeType } volumeType - Audio stream type. + * @param { number } callingUid - Uid of the stream owner. + * @returns { number } Current system volume level. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + */ + getSystemVolumeByUid(volumeType: AudioVolumeType, callingUid: number): number; + /** * Listens for system volume change events. This method uses a callback to get volume change events. * @param { 'volumeChange' } type - Type of the event to listen for. Only the volumeChange event is supported. @@ -4891,6 +5239,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#event:streamVolumeChange */ on(type: 'volumeChange', callback: Callback): void; @@ -4904,6 +5254,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#event:streamVolumeChange */ off(type: 'volumeChange', callback?: Callback): void; @@ -5185,6 +5537,24 @@ declare namespace audio { * @since 20 */ off(type: 'streamVolumeChange', callback?: Callback): void; + + /** + * Interface for forcibly setting the volume type by pressing the volume key. + * @permission ohos.permission.MODIFY_AUDIO_SETTINGS + * @param { AudioVolumeType } volumeType - Audio volume type. + * that the application expects to control using the volume key. + * @param { number } duration - Duration for continuing to control the volume type when no key is pressed. + * The forced volume type setting is released when the timer expires. The maximum duration is 10 seconds. + * If the duration is set to -1, the setting is canceled. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system App. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + */ + forceVolumeKeyControlType(volumeType: AudioVolumeType, duration: number): void; } /** @@ -5269,6 +5639,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream */ getVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -5285,6 +5657,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream */ getVolume(volumeType: AudioVolumeType): Promise; /** @@ -5309,6 +5683,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream */ getVolumeSync(volumeType: AudioVolumeType): number; @@ -5326,6 +5702,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream */ getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -5342,6 +5720,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream */ getMinVolume(volumeType: AudioVolumeType): Promise; /** @@ -5366,6 +5746,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream */ getMinVolumeSync(volumeType: AudioVolumeType): number; @@ -5383,6 +5765,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream */ getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -5399,6 +5783,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream */ getMaxVolume(volumeType: AudioVolumeType): Promise; /** @@ -5423,6 +5809,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream */ getMaxVolumeSync(volumeType: AudioVolumeType): number; @@ -5465,6 +5853,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream */ isMute(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -5483,6 +5873,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream */ isMute(volumeType: AudioVolumeType): Promise; /** @@ -5509,6 +5901,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream */ isMuteSync(volumeType: AudioVolumeType): boolean; @@ -5863,6 +6257,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream */ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType, callback: AsyncCallback): void; /** @@ -5895,6 +6291,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream */ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): Promise; /** @@ -5923,6 +6321,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform * @since 12 + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream */ getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): number; @@ -6473,12 +6873,13 @@ declare namespace audio { /** * Enables or disables collaborative playback for the specified device. * Currently, only A2DP audio devices support collaborative playback. - * If the system is using the specified device for audio output, + * If the system is using the specified device for audio output, * the audio will be played from both the local speaker and the specified device after this API is called. * @param { AudioDeviceDescriptor } deviceDescriptor - Audio device descriptor. * @param { boolean } enabled - Whether to enable or disable collaborative playback. The value true means to enable it, and false means to disable it. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 6800101 - Parameter verification failed. Possible causes: * 1. The specified device is not an A2DP device. * 2. The specified device is not connected. @@ -7454,6 +7855,18 @@ declare namespace audio { * @since 12 */ REASON_OVERRODE = 3, + /** + * Device information when the audio session is activated. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + REASON_SESSION_ACTIVATED = 4, + /** + * There is a higher-priority stream, causing the system device to change. + * @syscap SystemCapability.Multimedia.Audio.Device + * @since 20 + */ + REASON_STREAM_PRIORITY_CHANGED = 5, } /** * Audio stream device change info. @@ -8988,7 +9401,7 @@ declare namespace audio { */ SOURCE_TYPE_UNPROCESSED = 14, /** - * live broadcast source type. + * Live broadcast source type. * @syscap SystemCapability.Multimedia.Audio.Core * @since 20 */ @@ -9581,11 +9994,11 @@ declare namespace audio { getOverflowCountSync(): number; /** - * Set if capturer want to be muted instead of interrupted. should be set before start + * Set if capturer want to be muted instead of interrupted, should be set before start. * @param { boolean } muteWhenInterrupted - use {@code true} if application want its stream to be muted * instead of interrupted. * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 6800103 - Operation not permit at current state. + * @throws { BusinessError } 6800103 - Operation not permitted at current state. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 20 */ @@ -11410,6 +11823,50 @@ declare namespace audio { * @since 20 */ enable(enable: boolean): Promise; + + /** + * Sets the reverberation of the audio loopback. + * + * @param { AudioLoopbackReverbPreset } preset - Reverberation preset. + * @returns { boolean } Returns success or failure. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + setReverbPreset(preset: AudioLoopbackReverbPreset): boolean; + + /** + * Get the current reverberation. + * The defalut reverberation preset of audio loopback is {@link AudioLoopbackReverbPreset#THEATER} if + * users do not modify the preset. + * + * @returns { AudioLoopbackReverbPreset } Returns the current reverberation. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + getReverbPreset(): AudioLoopbackReverbPreset; + + /** + * Sets the equalizer preset of the audio loopback. + * + * @param { AudioLoopbackEqualizerPreset } preset - Equalizer preset. + * @returns { boolean } Returns success or failure. + * @throws { BusinessError } 6800101 - Parameter verification failed. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + setEqualizerPreset(preset: AudioLoopbackEqualizerPreset): boolean; + + /** + * Gets the current equalizer preset. + * The defalut equalizer preset of audio loopback is {@link AudioLoopbackEqualizerPreset#FULL} if + * users do not modify the preset. + * + * @returns { AudioLoopbackEqualizerPreset } Returns the current equalizer preset. + * @syscap SystemCapability.Multimedia.Audio.Capturer + * @since 21 + */ + getEqualizerPreset(): AudioLoopbackEqualizerPreset; } } diff --git a/api/@ohos.multimedia.audioHaptic.d.ts b/api/@ohos.multimedia.audioHaptic.d.ts index 7e44f87dda65a9ac95084908c3e8dfa6ef11ea6b..a5456ee2d82d18435116aab709ed059a7c81c17d 100644 --- a/api/@ohos.multimedia.audioHaptic.d.ts +++ b/api/@ohos.multimedia.audioHaptic.d.ts @@ -398,6 +398,17 @@ declare namespace audioHaptic { * @since 20 */ setHapticsRamp(duration: number, startIntensity: number, endIntensity: number): Promise; + + /** + * Set the playback to be looping. This method uses a promise to return the result. + * This function should be called before player release. + * @param { boolean } loop - Whether to loop or not, value true means loop. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 5400102 - Operate not permit in current state. + * @syscap SystemCapability.Multimedia.AudioHaptic.Core + * @since 20 + */ + setLoop(loop: boolean): Promise; } } export default audioHaptic; diff --git a/api/@ohos.multimedia.avsession.d.ts b/api/@ohos.multimedia.avsession.d.ts index be9a29d35a61545825242968a2f56afc36d408cb..7e95671d23a39548f79db472fb13d1793c6728fc 100644 --- a/api/@ohos.multimedia.avsession.d.ts +++ b/api/@ohos.multimedia.avsession.d.ts @@ -452,7 +452,7 @@ declare namespace avSession { * Unregister distributed session changed callback * @param { 'distributedSessionChange' } type - Registration Type, distributed session change * @param { DistributedSessionType } distributedSessionType - Indicates the distributed session type - * @param { Callback> } callback - The callback will return remote changed AVSessionController. + * @param { Callback> } [callback] - The callback will return remote changed AVSessionController. * @throws { BusinessError } 202 - Not System App. * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager @@ -2064,7 +2064,7 @@ declare namespace avSession { /** * Unsubscribes to playWithAssetId events. * @param { 'playWithAssetId' } type - Event type. - * @param { Callback } callback - Callback used to handle the 'playWithAssetId' command. + * @param { Callback } [callback] - Callback used to handle the 'playWithAssetId' command. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -2239,7 +2239,7 @@ declare namespace avSession { /** * Unregister setTargetLoopMode command callback * @param { 'setTargetLoopMode' } type - Registration Type 'setTargetLoopMode' - * @param { Callback } callback - Used to handle setTargetLoopMode command.The callback provides the {@link LoopMode} + * @param { Callback } [callback] - Used to handle setTargetLoopMode command.The callback provides the {@link LoopMode} * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -2702,6 +2702,45 @@ declare namespace avSession { */ off(type: 'castDisplayChange', callback?: Callback): void; + /** + * Register listener for custom data sent from remote device. + * @param { 'customDataChange' } type - Type of the 'customDataChange' to listen for. + * @param { Callback> } callback - Callback used to retrieve custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + on(type: 'customDataChange', callback: Callback>): void; + + /** + * Unsubscribes from custom data changes. + * @param { 'customDataChange' } type Custom data type. + * @param { Callback> } [callback] Callback used to return the custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + off(type: 'customDataChange', callback?: Callback>): void; + + /** + * Sends custom data to a remote device. + * @param { Record } data Custom data populated by the application. + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + sendCustomData(data: Record): Promise; + /** * Stop current cast and disconnect device connection. * @param { AsyncCallback } callback A callback instance used to return when cast stopped completed. @@ -3175,6 +3214,18 @@ declare namespace avSession { */ processMediaKeyResponse(assetId: string, response: Uint8Array): Promise; + /** + * Sends custom data to a remote device. + * @param { Record } data Custom data populated by the application. + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + sendCustomData(data: Record): Promise; + /** * Destroy the controller * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. @@ -3832,6 +3883,30 @@ declare namespace avSession { * @since 12 */ off(type: 'keyRequest', callback?: KeyRequestCallback): void; + + /** + * Register listener for custom data sent from remote device. + * @param { 'customDataChange' } type - Type of the 'customDataChange' to listen for. + * @param { Callback> } callback - Callback used to retrieve custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + on(type: 'customDataChange', callback: Callback>): void; + + /** + * Unregister listener for custom data sent from remote device. + * @param { 'customDataChange' } type - Type of the 'customDataChange' to listen for. + * @param { Callback> } [callback] - Callback used to retrieve custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + off(type: 'customDataChange', callback?: Callback>): void; } /** @@ -4114,7 +4189,7 @@ declare namespace avSession { * @atomicservice * @since 19 */ - OH_AVCODEC_MIMETYPE_VIDEO_AVC = "video/avc", + OH_AVCODEC_MIMETYPE_VIDEO_AVC = 'video/avc', /** * Defination of hevc codec type. @@ -4122,7 +4197,7 @@ declare namespace avSession { * @atomicservice * @since 19 */ - OH_AVCODEC_MIMETYPE_VIDEO_HEVC = "video/hevc", + OH_AVCODEC_MIMETYPE_VIDEO_HEVC = 'video/hevc', /** * Defination of audio vivid codec type. @@ -4130,7 +4205,7 @@ declare namespace avSession { * @atomicservice * @since 19 */ - OH_AVCODEC_MIMETYPE_AUDIO_VIVID = "audio/av3a", + OH_AVCODEC_MIMETYPE_AUDIO_VIVID = 'audio/av3a', } /** @@ -4787,9 +4862,11 @@ declare namespace avSession { dataSrc?: media.AVDataSrcDescriptor; /** - * Pcm source type. The app should send pcm data directly to the system. - * @type { ?boolean} + * Source type that supports PCM casting. + * The application can send PCM data directly to the system through audio APIs, without using AVSession to set data. + * @type { ?boolean } Boolean type. The value true means that PCM casting is supported. * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice * @since 20 */ pcmSrc?: boolean; @@ -4876,6 +4953,15 @@ declare namespace avSession { * @since 12 */ displayTags?: number; + + /** + * Custom data sent by the application to the receiver during casting. + * @type { ?string } + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + launchClientData?: string; } /** @@ -5656,6 +5742,15 @@ declare namespace avSession { */ supportedDrmCapabilities?: Array; + /** + * Whether the device supports pull-end playback, including a collection of pull-end client IDs. + * @type { ?Array } IDs of pull-end clients. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + supportedPullClients?: Array; + /** * Define different authentication status. * 0: Device not authenticated. @@ -5688,10 +5783,10 @@ declare namespace avSession { mediumTypes?: number; /** - * When the device protocol is {@link ProtocolType.TYPE_HIGH_DEFINITION_AUDIO}, - * the device audio capabilities will be presented to let application choose proper resource to play. - * @type { ?AudioCapabilities } + * Audio capabilities supported by the device. + * @type { ?AudioCapabilities } Audio capabilities supported by the device. * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice * @since 20 */ audioCapabilities?: AudioCapabilities; @@ -7518,6 +7613,46 @@ declare namespace avSession { * @since 12 */ off(type: 'extrasChange', callback?: (extras: {[key: string]: Object}) => void): void; + + /** + * Send custom data to this avsession. + * @param { Record } data - The custom data populated by application. + * @returns { Promise } void result promise when executed successfully + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600102 - The session does not exist. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + sendCustomData(data: Record): Promise; + + /** + * Register listener for custom data. + * @param { 'customDataChange' } type - Type of the 'customDataChange' to listen for. + * @param { Callback> } callback - Callback used to retrieve custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + on(type: 'customDataChange', callback: Callback>): void; + + /** + * Unregister listener for custom data. + * @param { 'customDataChange' } type - Type of the 'customDataChange' to listen for. + * @param { Callback> } [callback] - Callback used to retrieve custom data. + * @throws { BusinessError } 6600101 - Session service exception. + * You are advised to:1.Scheduled retry.2.Destroy the current session or session controller and re-create it. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @atomicservice + * @since 20 + */ + off(type: 'customDataChange', callback?: Callback>): void; } /** diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index c4eac85b28d0622b8ae4db07c4cdd630c2b0df0e..38ded1e1147a6ec8a814c0febd17361407269430 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -198,6 +198,57 @@ declare namespace camera { FOLDED = 2 } + /** + * Enumerates the system pressure levels of the current camera session. When the system pressure increases, + * you are advised to reduce the load of the current camera session. + * @enum { number } + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + enum SystemPressureLevel { + /** + * Normal level. This level indicates that the system pressure is normal. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + SYSTEM_PRESSURE_NORMAL = 0, + + /** + * Low level. This level indicates that the system pressure is slightly increased. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + SYSTEM_PRESSURE_MILD = 1, + + /** + * Severity level. This level indicates that the system pressure is severely increased. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + SYSTEM_PRESSURE_SEVERE = 2, + + /** + * Critical level. This level indicates that the system pressure has reached a critical threshold. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + SYSTEM_PRESSURE_CRITICAL = 3, + + /** + * Shutdown level. This level indicates that the system pressure is fatal, and the camera session will be + * shut down soon. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + SYSTEM_PRESSURE_SHUTDOWN = 4 + } + /** * Profile for camera streams. * @@ -450,6 +501,38 @@ declare namespace camera { readonly supportedMetadataObjectTypes: Array; } + /** + * Control center status info. + * + * @typedef ControlCenterStatusInfo + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface ControlCenterStatusInfo { + /** + * Control center effect type. + * + * @type { ControlCenterEffectType } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + readonly effectType: ControlCenterEffectType; + + /** + * If effect type is active. + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + readonly isActive: boolean; + } + /** * Enum for camera error code. * @@ -1456,6 +1539,54 @@ declare namespace camera { */ off(type: 'cameraMute', callback?: AsyncCallback): void; + /** + * Subscribes control center status change event callback. + * + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + on(type: 'controlCenterStatusChange', callback: AsyncCallback): void; + + /** + * Unsubscribes control center status change event callback. + * + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + off(type: 'controlCenterStatusChange', callback?: AsyncCallback): void; + + /** + * Check if the control center active. + * + * @returns { boolean } this value that specifies whether the control center active. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + isControlCenterActive(): boolean; + + /** + * Create a ControlCenterSession instance. + * + * @permission ohos.permission.CAMERA_CONTROL + * @returns { ControlCenterSession } the ControlCenterSession instance. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + createControlCenterSession(): ControlCenterSession; + /** * Determines whether the camera device supports prelaunch. * This function must be called in prior to the setPrelaunchConfig and prelaunch functions. @@ -2454,6 +2585,18 @@ declare namespace camera { * @since 18 */ readonly isRetractable?: boolean; + + /** + * Camera lens equivalent focal length + * + * @type { ?Array } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + readonly lensEquivalentFocalLength?: Array; } /** @@ -2824,6 +2967,41 @@ declare namespace camera { * @since 18 */ controlAuxiliary(auxiliaryType: AuxiliaryType, auxiliaryStatus: AuxiliaryStatus): Promise; + + /** + * Query whether physical camera orientation is variable under different fold status. + * + * @returns { boolean } Is physical camera orientation variable under different fold status. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + isPhysicalCameraOrientationVariable(): boolean; + + /** + * Get physical camera orientation under current fold status. + * + * @returns { int } The physical camera orientation. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + getPhysicalCameraOrientation(): int; + + /** + * Choose whether to use the physical camera orientation. + * + * @param { boolean } isUsed - Use physical camera orientation if TRUE. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + usePhysicalCameraOrientation(isUsed: boolean): void; } /** @@ -4886,6 +5064,18 @@ declare namespace camera { * @since 12 */ getZoomPointInfos(): Array; + + /** + * Checks whether zoom center point is supported. + * + * @returns { boolean } Is zoom center point supported. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + isZoomCenterPointSupported(): boolean; } /** @@ -5003,6 +5193,30 @@ declare namespace camera { * @since 11 */ unprepareZoom(): void; + + /** + * Gets current zoom center point. + * + * @returns { Point } The zoom center point + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + getZoomCenterPoint(): Point; + + /** + * Sets the zoom center point. + * + * @param { Point } point - The point of zoom center. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + setZoomCenterPoint(point: Point): void; } /** @@ -5540,6 +5754,33 @@ declare namespace camera { BLACK_WHITE = 3 } + /** + * Enumerates the control center effect types. + * + * @enum { number } + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + enum ControlCenterEffectType { + /** + * Beauty type. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + BEAUTY = 0, + /** + * Portrait type. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + PORTRAIT = 1 + } + /** * Enum for policy type * @@ -5732,6 +5973,58 @@ declare namespace camera { setColorSpace(colorSpace: colorSpaceManager.ColorSpace): void; } + /** + * Control Center Query object. + * + * @interface ControlCenterQuery + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface ControlCenterQuery { + /** + * Checks whether control center is supported. + * + * @returns { boolean } Is control center supported. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + isControlCenterSupported(): boolean; + + /** + * Gets the supported effect types. + * + * @returns { Array } The array of the supported control center type for the session. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + getSupportedEffectTypes(): Array; + } + + /** + * Control center object. + * + * @extends ControlCenterQuery + * @interface ControlCenter + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface ControlCenter extends ControlCenterQuery { + /** + * Enable control center for session. + * + * @param { boolean } enabled enable control center for session if TRUE. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + enableControlCenter(enabled: boolean): void; + } + /** * Auto Device Switch Query object. * @@ -7624,6 +7917,17 @@ declare namespace camera { * @systemapi * @since 11 */ + /** + * Subscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return macro detection result, + * true indicating macro scene is detected and can be enabled, false indicating no macro scene is detected, + * and macro should be disabled. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; /** @@ -7636,8 +7940,41 @@ declare namespace camera { * @systemapi * @since 11 */ + /** + * Unsubscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return macro detection result, + * true indicating macro scene is detected and can be enabled, false indicating no macro scene is detected, + * and macro should be disabled. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; + /** + * Subscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + on(type: 'systemPressureLevelChange', callback: AsyncCallback): void + + /** + * Unsubscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + off(type: 'systemPressureLevelChange', callback?: AsyncCallback): void + /** * Subscribes to feature detection results. * @@ -7882,13 +8219,13 @@ declare namespace camera { /** * Video session object. * - * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro + * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, ControlCenter, AutoDeviceSwitch, Macro * @interface VideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 20 */ - interface VideoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { + interface VideoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, ControlCenter, AutoDeviceSwitch, Macro { /** * Gets whether the choosed preconfig type can be used to configure video session. * Must choose preconfig type from {@link PreconfigType}. @@ -8077,6 +8414,17 @@ declare namespace camera { * @systemapi * @since 11 */ + /** + * Subscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return macro detection result, + * true indicating macro scene is detected and can be enabled, false indicating no macro scene is detected, + * and macro should be disabled. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; /** @@ -8089,8 +8437,63 @@ declare namespace camera { * @systemapi * @since 11 */ + /** + * Unsubscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return macro detection result, + * true indicating macro scene is detected and can be enabled, false indicating no macro scene is detected, + * and macro should be disabled. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; + /** + * Subscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + on(type: 'systemPressureLevelChange', callback: AsyncCallback): void + + /** + * Unsubscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + off(type: 'systemPressureLevelChange', callback?: AsyncCallback): void + + /** + * Subscribes to control center effect status change callback. + * + * @param { 'controlCenterEffectStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get control center effect status. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + on(type: 'controlCenterEffectStatusChange', callback: AsyncCallback): void; + + /** + * Unsubscribes to control center effect status change callback. + * + * @param { 'controlCenterEffectStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get control center effect status. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + off(type: 'controlCenterEffectStatusChange', callback?: AsyncCallback): void; + /** * Subscribes to lcd flash status. * @@ -10592,6 +10995,16 @@ declare namespace camera { * @since 11 */ sketchRatio: number; + + /** + * The offset point of the sketch stream. + * + * @type { Point } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + centerPointOffset: Point; } /** @@ -11594,6 +12007,34 @@ declare namespace camera { HEVC = 1 } + /** + * Enum for photo quality prioritization. + * + * @enum {number} + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + */ + enum PhotoQualityPrioritization { + /** + * High quality photos are the top preference, even at the expense of shot-to-shot time. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + */ + HIGH_QUALITY = 0, + + /** + * Prefering speed over quality, even at the expense of quality. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + */ + SPEED = 1, + } + /** * Photo output object. * @@ -12618,6 +13059,32 @@ declare namespace camera { * @since 18 */ off(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; + + /** + * Query whether photo quality prioritization is supported. + * + * @param { PhotoQualityPrioritization } qualityPrioritization - Photo quality prioritization type. + * @returns { boolean } - Whether the choosed quality prioritization type is supported. + * @throws { BusinessError } 7400201 - Camera service fatal error, + * reconfiguring streams is needed to recover from failure. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + */ + isPhotoQualityPrioritizationSupported(qualityPrioritization: PhotoQualityPrioritization): boolean; + + /** + * Set photo quality prioritization. + * + * @param { PhotoQualityPrioritization } qualityPrioritization - Photo quality prioritization. + * @throws { BusinessError } 7400201 - Camera service fatal error, + * reconfiguring streams is needed to recover from failure. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 21 + */ + setPhotoQualityPrioritization(qualityPrioritization: PhotoQualityPrioritization): void; } /** @@ -14718,6 +15185,28 @@ declare namespace camera { setTimeLapsePreviewType(type: TimeLapsePreviewType): void; } + /** + * Control center session object. + * + * @extends Beauty, Aperture + * @interface ControlCenterSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + interface ControlCenterSession extends Beauty, Aperture { + /** + * Release control center session object. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + release(): Promise; + } + /** * Enum for Depth Data Accuracy. * diff --git a/api/@ohos.multimedia.image.d.ets b/api/@ohos.multimedia.image.d.ets deleted file mode 100644 index 85d84912bf6587e42666e22a704a06a786f66ad5..0000000000000000000000000000000000000000 --- a/api/@ohos.multimedia.image.d.ets +++ /dev/null @@ -1,3215 +0,0 @@ -/* - * Copyright (C) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ImageKit - * @arkts 1.2 - */ - -import { AsyncCallback } from './@ohos.base'; -import type colorSpaceManager from './@ohos.graphics.colorSpaceManager'; -import type resourceManager from './@ohos.resourceManager'; -import type rpc from './@ohos.rpc'; - -/** - * This module provides the capability of image codec and access - * @namespace image - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -declare namespace image { - /** - * Enumerates pixel map formats. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - enum PixelMapFormat { - /** - * Indicates an unknown format. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - UNKNOWN = 0, - - /** - * Indicates that each pixel is stored on 16 bits. Only the R, G, and B components are encoded - * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, - * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - RGB_565 = 2, - - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - RGBA_8888 = 3, - - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - BGRA_8888 = 4, - - /** - * Indicates that each pixel is stored on 24 bits. Each pixel contains 3 components:R(8bits), G(8bits), B(8bits) - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - RGB_888 = 5, - - /** - * Indicates that each pixel is stored on 8 bits. Each pixel contains 1 component:ALPHA(8bits) - * and is stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - ALPHA_8 = 6, - - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) - * and are stored from the higher-order to the lower-order bits in F16. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - RGBA_F16 = 7, - - /** - * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - NV21 = 8, - - /** - * Indicates that the storage order is to store Y first and then U V alternately each occupies 8 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - NV12 = 9, - - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components: - * R(10bits), G(10bits), B(10bits), A(2bits) and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - RGBA_1010102 = 10, - - /** - * Indicates that the storage order is to store Y first and then U V alternately each occupies 10 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - YCBCR_P010 = 11, - - /** - * Indicates that the storage order is to store Y first and then V U alternately each occupies 10 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - YCRCB_P010 = 12, - } - - /** - * Enumerates image resolution quality. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @systemapi - * @since 20 - */ - enum ResolutionQuality { - /** - * Low quality images, short decoding time. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @systemapi - * @since 20 - */ - LOW = 1, - - /** - * Medium quality images, moderate decoding time. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @systemapi - * @since 20 - */ - MEDIUM = 2, - - /** - * High quality images, longer decoding time. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @systemapi - * @since 20 - */ - HIGH = 3 - } - - /** - * Describes the size of an image. - * - * @typedef Size - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface Size { - /** - * Height - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - height: int; - - /** - * Width - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - width: int; - } - - /** - * Enumerates exchangeable image file format (Exif) information types of an image. - * - * @enum { string } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - enum PropertyKey { - /** - * Number of bits in each pixel of an image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - BITS_PER_SAMPLE = 'BitsPerSample', - - /** - * Image rotation mode. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ORIENTATION = 'Orientation', - - /** - * Image length. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - IMAGE_LENGTH = 'ImageLength', - - /** - * Image width. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - IMAGE_WIDTH = 'ImageWidth', - - /** - * GPS latitude. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_LATITUDE = 'GPSLatitude', - - /** - * GPS longitude. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_LONGITUDE = 'GPSLongitude', - - /** - * GPS latitude reference. For example, N indicates north latitude and S indicates south latitude. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_LATITUDE_REF = 'GPSLatitudeRef', - - /** - * GPS longitude reference. For example, E indicates east longitude and W indicates west longitude. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_LONGITUDE_REF = 'GPSLongitudeRef', - - /** - * Shooting time - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DATE_TIME_ORIGINAL = 'DateTimeOriginal', - - /** - * Exposure time - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - EXPOSURE_TIME = 'ExposureTime', - - /** - * Scene type - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_TYPE = 'SceneType', - - /** - * ISO speedratings - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ISO_SPEED_RATINGS = 'ISOSpeedRatings', - - /** - * Aperture value - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - F_NUMBER = 'FNumber', - - /** - * Date time - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - DATE_TIME = 'DateTime', - - /** - * GPS time stamp - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - GPS_TIME_STAMP = 'GPSTimeStamp', - - /** - * GPS date stamp - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - GPS_DATE_STAMP = 'GPSDateStamp', - - /** - * Image description - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - IMAGE_DESCRIPTION = 'ImageDescription', - - /** - * Make - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - MAKE = 'Make', - - /** - * Model - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - MODEL = 'Model', - - /** - * Photo mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - PHOTO_MODE = 'PhotoMode', - - /** - * Sensitivity type - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - SENSITIVITY_TYPE = 'SensitivityType', - - /** - * Standard output sensitivity - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - STANDARD_OUTPUT_SENSITIVITY = 'StandardOutputSensitivity', - - /** - * Recommended exposure index - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - RECOMMENDED_EXPOSURE_INDEX = 'RecommendedExposureIndex', - - /** - * ISO speed - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - ISO_SPEED = 'ISOSpeedRatings', - - /** - * Aperture value - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - APERTURE_VALUE = 'ApertureValue', - - /** - * Exposure bias value - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - EXPOSURE_BIAS_VALUE = 'ExposureBiasValue', - - /** - * Metering mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - METERING_MODE = 'MeteringMode', - - /** - * Light source - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - LIGHT_SOURCE = 'LightSource', - - /** - * Flash - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - FLASH = 'Flash', - - /** - * Focal length - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - FOCAL_LENGTH = 'FocalLength', - - /** - * User comment - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - USER_COMMENT = 'UserComment', - - /** - * Pixel x dimension - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - PIXEL_X_DIMENSION = 'PixelXDimension', - - /** - * Pixel y dimension - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - PIXEL_Y_DIMENSION = 'PixelYDimension', - - /** - * White balance - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - WHITE_BALANCE = 'WhiteBalance', - - /** - * Focal length in 35mm film - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - FOCAL_LENGTH_IN_35_MM_FILM = 'FocalLengthIn35mmFilm', - - /** - * Capture mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - CAPTURE_MODE = 'HwMnoteCaptureMode', - - /** - * Physical aperture - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - PHYSICAL_APERTURE = 'HwMnotePhysicalAperture', - - /** - * Roll Angle - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ROLL_ANGLE = 'HwMnoteRollAngle', - - /** - * Pitch Angle - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - PITCH_ANGLE = 'HwMnotePitchAngle', - - /** - * Capture Scene: Food - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_FOOD_CONF = 'HwMnoteSceneFoodConf', - - /** - * Capture Scene: Stage - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_STAGE_CONF = 'HwMnoteSceneStageConf', - - /** - * Capture Scene: Blue Sky - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_BLUE_SKY_CONF = 'HwMnoteSceneBlueSkyConf', - - /** - * Capture Scene: Green Plant - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_GREEN_PLANT_CONF = 'HwMnoteSceneGreenPlantConf', - - /** - * Capture Scene: Beach - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_BEACH_CONF = 'HwMnoteSceneBeachConf', - - /** - * Capture Scene: Snow - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_SNOW_CONF = 'HwMnoteSceneSnowConf', - - /** - * Capture Scene: Sunset - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_SUNSET_CONF = 'HwMnoteSceneSunsetConf', - - /** - * Capture Scene: Flowers - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_FLOWERS_CONF = 'HwMnoteSceneFlowersConf', - - /** - * Capture Scene: Night - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_NIGHT_CONF = 'HwMnoteSceneNightConf', - - /** - * Capture Scene: Text - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_TEXT_CONF = 'HwMnoteSceneTextConf', - - /** - * Face Count - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_COUNT = 'HwMnoteFaceCount', - - /** - * Focus Mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FOCUS_MODE = 'HwMnoteFocusMode', - - /** - * The scheme used for image compression. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COMPRESSION = 'Compression', - - /** - * Pixel composition, such as RGB or YCbCr. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - PHOTOMETRIC_INTERPRETATION = 'PhotometricInterpretation', - - /** - * For each strip, the byte offset of that strip. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - STRIP_OFFSETS = 'StripOffsets', - - /** - * The number of components per pixel. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SAMPLES_PER_PIXEL = 'SamplesPerPixel', - - /** - * The number of rows per strip of image data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ROWS_PER_STRIP = 'RowsPerStrip', - - /** - * The total number of bytes in each strip of image data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - STRIP_BYTE_COUNTS = 'StripByteCounts', - - /** - * The image resolution in the width direction. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - X_RESOLUTION = 'XResolution', - - /** - * The image resolution in the height direction. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - Y_RESOLUTION = 'YResolution', - - /** - * Indicates whether pixel components are recorded in a chunky or planar format. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - PLANAR_CONFIGURATION = 'PlanarConfiguration', - - /** - * The unit used to measure XResolution and YResolution. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - RESOLUTION_UNIT = 'ResolutionUnit', - - /** - * The transfer function for the image, typically used for color correction. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - TRANSFER_FUNCTION = 'TransferFunction', - - /** - * The name and version of the software used to generate the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SOFTWARE = 'Software', - - /** - * The name of the person who created the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ARTIST = 'Artist', - - /** - * The chromaticity of the white point of the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - WHITE_POINT = 'WhitePoint', - - /** - * The chromaticity of the primary colors of the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - PRIMARY_CHROMATICITIES = 'PrimaryChromaticities', - - /** - * The matrix coefficients for transformation from RGB to YCbCr image data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - YCBCR_COEFFICIENTS = 'YCbCrCoefficients', - - /** - * The sampling ratio of chrominance components to the luminance component. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - YCBCR_SUB_SAMPLING = 'YCbCrSubSampling', - - /** - * The position of chrominance components in relation to the luminance component. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - YCBCR_POSITIONING = 'YCbCrPositioning', - - /** - * The reference black point value and reference white point value. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - REFERENCE_BLACK_WHITE = 'ReferenceBlackWhite', - - /** - * Copyright information for the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COPYRIGHT = 'Copyright', - - /** - * The offset to the start byte (SOI) of JPEG compressed thumbnail data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - JPEG_INTERCHANGE_FORMAT = 'JPEGInterchangeFormat', - - /** - * The number of bytes of JPEG compressed thumbnail data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - JPEG_INTERCHANGE_FORMAT_LENGTH = 'JPEGInterchangeFormatLength', - - /** - * The class of the program used by the camera to set exposure when the picture is taken. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - EXPOSURE_PROGRAM = 'ExposureProgram', - - /** - * Indicates the spectral sensitivity of each channel of the camera used. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SPECTRAL_SENSITIVITY = 'SpectralSensitivity', - - /** - * Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - OECF = 'OECF', - - /** - * The version of the Exif standard supported. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - EXIF_VERSION = 'ExifVersion', - - /** - * The date and time when the image was stored as digital data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DATE_TIME_DIGITIZED = 'DateTimeDigitized', - - /** - * Information specific to compressed data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COMPONENTS_CONFIGURATION = 'ComponentsConfiguration', - - /** - * The shutter speed, expressed as an APEX (Additive System of Photographic Exposure) value. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SHUTTER_SPEED = 'ShutterSpeedValue', - - /** - * The brightness value of the image, in APEX units. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - BRIGHTNESS_VALUE = 'BrightnessValue', - - /** - * The smallest F number of lens. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - MAX_APERTURE_VALUE = 'MaxApertureValue', - - /** - * The distance to the subject, measured in meters. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBJECT_DISTANCE = 'SubjectDistance', - - /** - * This tag indicate the location and area of the main subject in the overall scene. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBJECT_AREA = 'SubjectArea', - - /** - * A tag for manufacturers of Exif/DCF writers to record any desired information. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - MAKER_NOTE = 'MakerNote', - - /** - * A tag for record fractions of seconds for the DateTime tag. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBSEC_TIME = 'SubsecTime', - - /** - * A tag used to record fractions of seconds for the DateTimeOriginal tag. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBSEC_TIME_ORIGINAL = 'SubsecTimeOriginal', - - /** - * A tag used to record fractions of seconds for the DateTimeDigitized tag. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBSEC_TIME_DIGITIZED = 'SubsecTimeDigitized', - - /** - * This tag denotes the Flashpix format version supported by an FPXR file, enhancing device compatibility. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FLASHPIX_VERSION = 'FlashpixVersion', - - /** - * The color space information tag, often recorded as the color space specifier. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COLOR_SPACE = 'ColorSpace', - - /** - * The name of an audio file related to the image data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - RELATED_SOUND_FILE = 'RelatedSoundFile', - - /** - * Strobe energy at image capture, in BCPS. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FLASH_ENERGY = 'FlashEnergy', - - /** - * Camera or input device spatial frequency table. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SPATIAL_FREQUENCY_RESPONSE = 'SpatialFrequencyResponse', - - /** - * Pixels per FocalPlaneResolutionUnit in the image width. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FOCAL_PLANE_X_RESOLUTION = 'FocalPlaneXResolution', - - /** - * Pixels per FocalPlaneResolutionUnit in the image height. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FOCAL_PLANE_Y_RESOLUTION = 'FocalPlaneYResolution', - - /** - * Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FOCAL_PLANE_RESOLUTION_UNIT = 'FocalPlaneResolutionUnit', - - /** - * Location of the main subject, relative to the left edge. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBJECT_LOCATION = 'SubjectLocation', - - /** - * Selected exposure index at capture. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - EXPOSURE_INDEX = 'ExposureIndex', - - /** - * Image sensor type on the camera. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SENSING_METHOD = 'SensingMethod', - - /** - * Indicates the image source. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FILE_SOURCE = 'FileSource', - - /** - * Color filter array (CFA) geometric pattern of the image sensor. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - CFA_PATTERN = 'CFAPattern', - - /** - * Indicates special processing on image data. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - CUSTOM_RENDERED = 'CustomRendered', - - /** - * Exposure mode set when the image was shot. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - EXPOSURE_MODE = 'ExposureMode', - - /** - * Digital zoom ratio at the time of capture. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DIGITAL_ZOOM_RATIO = 'DigitalZoomRatio', - - /** - * Type of scene captured. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_CAPTURE_TYPE = 'SceneCaptureType', - - /** - * Degree of overall image gain adjustment. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GAIN_CONTROL = 'GainControl', - - /** - * Direction of contrast processing applied by the camera. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - CONTRAST = 'Contrast', - - /** - * Direction of saturation processing applied by the camera. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SATURATION = 'Saturation', - - /** - * The direction of sharpness processing applied by the camera. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SHARPNESS = 'Sharpness', - - /** - * Information on picture-taking conditions for a specific camera model. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DEVICE_SETTING_DESCRIPTION = 'DeviceSettingDescription', - - /** - * Indicates the distance range to the subject. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBJECT_DISTANCE_RANGE = 'SubjectDistanceRange', - - /** - * An identifier uniquely assigned to each image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - IMAGE_UNIQUE_ID = 'ImageUniqueID', - - /** - * The version of the GPSInfoIFD. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_VERSION_ID = 'GPSVersionID', - - /** - * Reference altitude used for GPS altitude. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_ALTITUDE_REF = 'GPSAltitudeRef', - - /** - * The altitude based on the reference in GPSAltitudeRef. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_ALTITUDE = 'GPSAltitude', - - /** - * The GPS satellites used for measurements. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_SATELLITES = 'GPSSatellites', - - /** - * The status of the GPS receiver when the image is recorded. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_STATUS = 'GPSStatus', - - /** - * The GPS measurement mode. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_MEASURE_MODE = 'GPSMeasureMode', - - /** - * The GPS DOP (data degree of precision). - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DOP = 'GPSDOP', - - /** - * The unit used to express the GPS receiver speed of movement. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_SPEED_REF = 'GPSSpeedRef', - - /** - * The speed of GPS receiver movement. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_SPEED = 'GPSSpeed', - - /** - * The reference for giving the direction of GPS receiver movement. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_TRACK_REF = 'GPSTrackRef', - - /** - * The direction of GPS receiver movement. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_TRACK = 'GPSTrack', - - /** - * The reference for the image's direction. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_IMG_DIRECTION_REF = 'GPSImgDirectionRef', - - /** - * The direction of the image when captured. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_IMG_DIRECTION = 'GPSImgDirection', - - /** - * Geodetic survey data used by the GPS receiver. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_MAP_DATUM = 'GPSMapDatum', - - /** - * Indicates the latitude reference of the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_LATITUDE_REF = 'GPSDestLatitudeRef', - - /** - * The latitude of the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_LATITUDE = 'GPSDestLatitude', - - /** - * Indicates the longitude reference of the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_LONGITUDE_REF = 'GPSDestLongitudeRef', - - /** - * The longitude of the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_LONGITUDE = 'GPSDestLongitude', - - /** - * The reference for the bearing to the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_BEARING_REF = 'GPSDestBearingRef', - - /** - * The bearing to the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_BEARING = 'GPSDestBearing', - - /** - * The measurement unit for the distance to the target point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_DISTANCE_REF = 'GPSDestDistanceRef', - - /** - * The distance to the destination point. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DEST_DISTANCE = 'GPSDestDistance', - - /** - * A character string recording the name of the method used for location finding. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_PROCESSING_METHOD = 'GPSProcessingMethod', - - /** - * A character string recording the name of the GPS area. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_AREA_INFORMATION = 'GPSAreaInformation', - - /** - * This field denotes if differential correction was applied to GPS data, crucial for precise location accuracy. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_DIFFERENTIAL = 'GPSDifferential', - - /** - * The serial number of the camera body. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - BODY_SERIAL_NUMBER = 'BodySerialNumber', - - /** - * The name of the camera owner. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - CAMERA_OWNER_NAME = 'CameraOwnerName', - - /** - * Indicates whether the image is a composite image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COMPOSITE_IMAGE = 'CompositeImage', - - /** - * The compression mode used for a compressed image, in unit bits per pixel. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - COMPRESSED_BITS_PER_PIXEL = 'CompressedBitsPerPixel', - - /** - * The DNGVersion tag encodes the four-tier version number for DNG specification compliance. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DNG_VERSION = 'DNGVersion', - - /** - * DefaultCropSize specifies the final image size in raw coordinates, accounting for extra edge pixels. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - DEFAULT_CROP_SIZE = 'DefaultCropSize', - - /** - * Indicates the value of coefficient gamma. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GAMMA = 'Gamma', - - /** - * The tag indicate the ISO speed latitude yyy value of the camera or input device that is defined in ISO 12232. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ISO_SPEED_LATITUDE_YYY = 'ISOSpeedLatitudeyyy', - - /** - * The tag indicate the ISO speed latitude zzz value of the camera or input device that is defined in ISO 12232. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - ISO_SPEED_LATITUDE_ZZZ = 'ISOSpeedLatitudezzz', - - /** - * The manufacturer of the lens. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - LENS_MAKE = 'LensMake', - - /** - * The model name of the lens. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - LENS_MODEL = 'LensModel', - - /** - * The serial number of the lens. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - LENS_SERIAL_NUMBER = 'LensSerialNumber', - - /** - * Specifications of the lens used. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - LENS_SPECIFICATION = 'LensSpecification', - - /** - * This tag provides a broad description of the data type in this subfile. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - NEW_SUBFILE_TYPE = 'NewSubfileType', - - /** - * This tag records the UTC offset for the DateTime tag, ensuring accurate timestamps regardless of location. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - OFFSET_TIME = 'OffsetTime', - - /** - * This tag records the UTC offset when the image was digitized, aiding in accurate timestamp adjustment. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - OFFSET_TIME_DIGITIZED = 'OffsetTimeDigitized', - - /** - * This tag records the UTC offset when the original image was created, crucial for time-sensitive applications. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - OFFSET_TIME_ORIGINAL = 'OffsetTimeOriginal', - - /** - * Exposure times of source images for a composite image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = 'SourceExposureTimesOfCompositeImage', - - /** - * The number of source images used for a composite image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = 'SourceImageNumberOfCompositeImage', - - /** - * This deprecated tag indicates the data type in this subfile. Use NewSubfileType instead. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SUBFILE_TYPE = 'SubfileType', - - /** - * This tag indicates horizontal positioning errors in meters. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GPS_H_POSITIONING_ERROR = 'GPSHPositioningError', - - /** - * This tag indicates the sensitivity of the camera or input device when the image was shot. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - PHOTOGRAPHIC_SENSITIVITY = 'PhotographicSensitivity', - - /** - * Burst Number - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - BURST_NUMBER = 'HwMnoteBurstNumber', - - /** - * Face Conf - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_CONF = 'HwMnoteFaceConf', - - /** - * Face Leye Center - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_LEYE_CENTER = 'HwMnoteFaceLeyeCenter', - - /** - * Face Mouth Center - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_MOUTH_CENTER = 'HwMnoteFaceMouthCenter', - - /** - * Face Pointer - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_POINTER = 'HwMnoteFacePointer', - - /** - * Face Rect - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_RECT = 'HwMnoteFaceRect', - - /** - * Face Reye Center - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_REYE_CENTER = 'HwMnoteFaceReyeCenter', - - /** - * Face Smile Score - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_SMILE_SCORE = 'HwMnoteFaceSmileScore', - - /** - * Face Version - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FACE_VERSION = 'HwMnoteFaceVersion', - - /** - * Front Camera - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - FRONT_CAMERA = 'HwMnoteFrontCamera', - - /** - * Scene Pointer - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_POINTER = 'HwMnoteScenePointer', - - /** - * Scene Version - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - SCENE_VERSION = 'HwMnoteSceneVersion', - - /** - * Is Xmage Supported - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - IS_XMAGE_SUPPORTED = 'HwMnoteIsXmageSupported', - - /** - * Xmage Mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - XMAGE_MODE = 'HwMnoteXmageMode', - - /** - * Xmage X1 Coordinate - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - XMAGE_LEFT = 'HwMnoteXmageLeft', - - /** - * Xmage Y1 Coordinate - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - XMAGE_TOP = 'HwMnoteXmageTop', - - /** - * Xmage X2 Coordinate - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - XMAGE_RIGHT = 'HwMnoteXmageRight', - - /** - * Xmage Y2 Coordinate - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - XMAGE_BOTTOM = 'HwMnoteXmageBottom', - - /** - * Cloud Enhancement Mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - CLOUD_ENHANCEMENT_MODE = 'HwMnoteCloudEnhancementMode', - - /** - * Wind Snapshot Mode - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - WIND_SNAPSHOT_MODE = 'HwMnoteWindSnapshotMode', - - /** - * GIF LOOP COUNT - * If infinite loop returns 0, other values represent the number of loops - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - GIF_LOOP_COUNT = 'GIFLoopCount' - } - - /** - * Enumerates alpha types. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - enum AlphaType { - /** - * Indicates an unknown alpha type. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - UNKNOWN = 0, - - /** - * Indicates that the image has no alpha channel, or all pixels in the image are fully opaque. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - OPAQUE = 1, - - /** - * Indicates that RGB components of each pixel in the image are premultiplied by alpha. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - PREMUL = 2, - - /** - * Indicates that RGB components of each pixel in the image are independent of alpha and are not premultiplied by alpha. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - UNPREMUL = 3 - } - - /** - * Enumerates decoding dynamic range. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum DecodingDynamicRange { - /** - * Decoding according to the content of the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - AUTO = 0, - - /** - * Decoding to standard dynamic range. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - SDR = 1, - - /** - * Decoding to high dynamic range. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - HDR = 2 - } - - /** - * Enumerates packing dynamic range. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum PackingDynamicRange { - /** - * Packing according to the content of the image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - AUTO = 0, - - /** - * Packing to standard dynamic range. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - SDR = 1, - } - - /** - * Enumerates the anti-aliasing level. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @atomicservice - * @since 20 - */ - enum AntiAliasingLevel { - /** - * Nearest-neighbor interpolation algorithm. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @atomicservice - * @since 20 - */ - NONE = 0, - - /** - * Bilinear interpolation algorithm. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @atomicservice - * @since 20 - */ - LOW = 1, - - /** - * Bilinear interpolation algorithm with mipmap linear filtering. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @atomicservice - * @since 20 - */ - MEDIUM = 2, - - /** - * Cubic interpolation algorithm. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @atomicservice - * @since 20 - */ - HIGH = 3, - } - - /** - * Enum for image scale mode. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - enum ScaleMode { - /** - * Indicates the effect that fits the image into the target size. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - FIT_TARGET_SIZE = 0, - - /** - * Indicates the effect that scales an image to fill the target image area and center-crops the part outside the area. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - CENTER_CROP = 1 - } - - /** - * Enumerates the HDR metadata types that need to be stored in Pixelmap. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum HdrMetadataKey { - /** - * Indicate the types of metadata that image needs to use. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - HDR_METADATA_TYPE = 0, - - /** - * Static metadata key. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - HDR_STATIC_METADATA = 1, - - /** - * Dynamic metadata key. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - HDR_DYNAMIC_METADATA = 2, - - /** - * Gainmap metadata key. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - HDR_GAINMAP_METADATA = 3, - } - - /** - * Value for HDR_METADATA_TYPE. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum HdrMetadataType { - /** - * No metadata. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - NONE = 0, - - /** - * Indicates that metadata will be used for the base image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - BASE = 1, - - /** - * Indicates that metadata will be used for the gainmap image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - GAINMAP = 2, - - /** - * Indicates that metadata will be used for the alternate image. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - ALTERNATE = 3, - } - - /** - * Describes region information. - * - * @typedef Region - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface Region { - /** - * Image size. - * - * @type { Size } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - size: Size; - - /** - * x-coordinate at the upper left corner of the image. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - x: int; - - /** - * y-coordinate at the upper left corner of the image. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - y: int; - } - - /** - * Describes area information in an image. - * - * @typedef PositionArea - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface PositionArea { - /** - * Image data that will be read or written. - * - * @type { ArrayBuffer } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - pixels: ArrayBuffer; - - /** - * Offset for data reading. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - offset: int; - - /** - * Number of bytes to read. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - stride: int; - - /** - * Region to read. - * - * @type { Region } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - region: Region; - } - - /** - * Describes image information. - * - * @typedef ImageInfo - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface ImageInfo { - /** - * Indicates image dimensions specified by a {@link Size} interface. - * - * @type { Size } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - size: Size; - - /** - * Indicates image default density. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - density: int; - - /** - * The number of byte per row. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.Core - * @form - * @atomicservice - * @since 20 - */ - stride: int; - - /** - * Indicates image format. - * - * @type { PixelMapFormat } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - pixelFormat: PixelMapFormat; - - /** - * Indicates image alpha type. - * - * @type { AlphaType } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - alphaType: AlphaType; - - /** - * Indicates image mime type. - * - * @type { string } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ - mimeType: string; - - /** - * Indicates whether the image high dynamic range - * - * @type { boolean } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - isHdr: boolean; - } - - /** - * Describes the option for image packing. - * - * @typedef PackingOption - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - interface PackingOption { - /** - * Multipurpose Internet Mail Extensions (MIME) format of the target image, for example, image/jpeg. - * - * @type { string } - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - format: string; - - /** - * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. - * - * @type { int } - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - quality: int; - - /** - * BufferSize of the target image. - * If this bufferSize is less than or equal to 0, it will be converted to 10MB. - * - * @type { ?int } - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - bufferSize?: int; - - /** - * The desired dynamic range of the target image. - * - * @type { ?PackingDynamicRange } - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 20 - */ - desiredDynamicRange?: PackingDynamicRange; - - /** - * Whether the image properties can be saved, like Exif. - * - * @type { ?boolean } - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 20 - */ - needsPackProperties?: boolean; - } - - /** - * Describes image properties. - * - * @typedef ImagePropertyOptions - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - interface ImagePropertyOptions { - /** - * Default property value. - * - * @type { ?string } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - defaultValue?: string; - } - - /** - * Describes image decoding parameters. - * - * @typedef DecodingOptions - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface DecodingOptions { - /** - * Number of image frames. - * - * @type { ?int } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - index?: int; - - /** - * Sampling ratio of the image pixel map. - * - * @type { ?int } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - sampleSize?: int; - - /** - * Rotation angle of the image pixel map. The value ranges from 0 to 360. - * - * @type { ?int } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - rotate?: int; - - /** - * Whether the image pixel map is editable. - * - * @type { ?boolean } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - editable?: boolean; - - /** - * Width and height of the image pixel map. The value (0, 0) indicates that the pixels are decoded - * based on the original image size. - * - * @type { ?Size } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - desiredSize?: Size; - - /** - * Cropping region of the image pixel map. - * - * @type { ?Region } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - desiredRegion?: Region; - - /** - * Data format of the image pixel map. - * - * @type { ?PixelMapFormat } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - desiredPixelFormat?: PixelMapFormat; - - /** - * The density for image pixel map. - * - * @type { ?int } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - fitDensity?: int; - - /** - * Color space of the image pixel map. - * - * @type { ?colorSpaceManager.ColorSpaceManager } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - desiredColorSpace?: colorSpaceManager.ColorSpaceManager; - - /** - * The desired dynamic range of the image pixelmap. - * - * @type { ?DecodingDynamicRange } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @since 20 - */ - desiredDynamicRange?: DecodingDynamicRange; - - /** - * Resolution Quality of the image. - * - * @type { ?ResolutionQuality } - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @systemapi - * @since 20 - */ - resolutionQuality?: ResolutionQuality; - } - - /** - * Initialization options for pixelmap. - * - * @typedef InitializationOptions - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface InitializationOptions { - /** - * PixelMap size. - * - * @type { Size } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - size: Size; - - /** - * PixelMap source format. - * - * @type { ?PixelMapFormat } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - srcPixelFormat?: PixelMapFormat; - - /** - * PixelMap expected format. - * - * @type { ?PixelMapFormat } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - pixelFormat?: PixelMapFormat; - - /** - * Editable or not. - * - * @type { ?boolean } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - editable?: boolean; - - /** - * PixelMap expected alpha type. - * - * @type { ?AlphaType } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - alphaType?: AlphaType; - - /** - * PixelMap expected scaling effect. - * - * @type { ?ScaleMode } - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - scaleMode?: ScaleMode; - } - - /** - * Create an empty pixelmap. - * - * @param { InitializationOptions } options Initialization options for pixelmap. - * @returns { PixelMap } Returns the instance if the operation is successful;Otherwise, return undefined. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @since 20 - */ -function createPixelMapSync(options: InitializationOptions): PixelMap; - - /** - * Creates an ImageSource instance based on the URI. - * - * @param { string } uri Image source URI. - * @returns { ImageSource } returns the ImageSource instance if the operation is successful; returns undefined otherwise. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @atomicservice - * @since 20 - */ - function createImageSource(uri: string): ImageSource; - - /** - * Creates an ImagePacker instance. - * - * @returns { ImagePacker } Returns the ImagePacker instance if the operation is successful; returns null otherwise. - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - function createImagePacker(): ImagePacker; - - /** - * PixelMap instance. - * - * @typedef PixelMap - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface PixelMap { - /** - * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses - * a promise to return the result. - * - * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. - * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - readPixelsToBuffer(dst: ArrayBuffer): Promise; - - /** - * Reads image pixel map data and writes the data to an ArrayBuffer. - * - * @param { ArrayBuffer } dst A buffer to which the image pixel map data will be written. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - readPixelsToBufferSync(dst: ArrayBuffer): void; - - /** - * Obtains pixel map information about this image. This method uses a promise to return the information. - * - * @returns { Promise } A Promise instance used to return the image pixel map information. If the operation fails, an error message is returned. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - getImageInfo(): Promise; - - /** - * Get image information from image source. - * - * @returns { ImageInfo } the image information. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - getImageInfoSync(): ImageInfo; - - /** - * Obtains the number of bytes in each line of the image pixel map. - * - * @returns { int } Number of bytes in each line. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - getBytesNumberPerRow(): int; - - /** - * Obtains the total number of bytes of the image pixel map. - * - * @returns { int } Total number of bytes. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - getPixelBytesNumber(): int; - - /** - * Obtains new pixel map with alpha information. This method uses a promise to return the information. - * - * @returns { Promise } A Promise instance used to return the new image pixel map. If the operation fails, an error message is returned. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - createAlphaPixelmap(): Promise; - - /** - * Obtains new pixel map with alpha information. - * - * @returns { PixelMap } return the new image pixel map. If the operation fails, an error message is returned. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @atomicservice - * @since 20 - */ - createAlphaPixelmapSync(): PixelMap; - - /** - * Image zoom in width and height. - * - * @param { double } x The zoom value of width. - * @param { double } y The zoom value of height. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @atomicservice - * @since 20 - */ - scaleSync(x: double, y: double): void; - - /** - * Image zoom in width and height with anti-aliasing. - * - * @param { double } x The zoom value of width. - * @param { double } y The zoom value of height. - * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @atomicservice - * @since 20 - */ - scaleSync(x: double, y: double, level: AntiAliasingLevel): void; - - /** - * Image flipping. - * - * @param { boolean } horizontal Is flip in horizontal. - * @param { boolean } vertical Is flip in vertical. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @atomicservice - * @since 20 - */ - flipSync(horizontal: boolean, vertical: boolean): void; - - /** - * Crop the image. This method uses a promise to return the result. - * - * @param { Region } region The region to crop. - * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - crop(region: Region): Promise; - - /** - * Crop the image. - * - * @param { Region } region The region to crop. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 501 - Resource Unavailable. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @atomicservice - * @since 20 - */ - cropSync(region: Region): void; - - /** - * Releases this PixelMap object. This method uses a promise to return the result. - * - * @returns { Promise } A Promise instance used to return the instance release result. If the operation fails, an error message is returned. - * @syscap SystemCapability.Multimedia.Image.Core - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - release(): Promise; - } - - /** - * Picture instance. - * - * @typedef Picture - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - interface Picture { - /** - * Obtains the pixel map of the main image. - * - * @returns { PixelMap } Returns the pixel map. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - getMainPixelmap(): PixelMap; - } - - /** - * Create a Picture object by the pixel map of the main image. - * - * @param { PixelMap } mainPixelmap The pixel map of the main image. - * @returns { Picture } Returns the Picture object. - * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types; 3.Parameter verification failed. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - function createPicture(mainPixelmap : PixelMap): Picture; - - /** - * AuxiliaryPicture instance. - * - * @typedef AuxiliaryPicture - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - interface AuxiliaryPicture { - /** - * Reads auxiliary picture data in an ArrayBuffer and writes the data to a AuxiliaryPicture object. This method - * uses a promise to return the result. - * - * @param { ArrayBuffer } data A buffer from which the auxiliary picture data will be read. - * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an - * error message is returned. - * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 7600301 - Memory alloc failed. - * @throws { BusinessError } 7600302 - Memory copy failed. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - writePixelsFromBuffer(data: ArrayBuffer): Promise; - - /** - * Reads image pixel map data and writes the data to an ArrayBuffer. This method uses - * a promise to return the result. - * - * @returns { Promise } A Promise instance used to return the pixel map data. - * @throws { BusinessError } 7600301 - Memory alloc failed. - * @throws { BusinessError } 7600302 - Memory copy failed. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - readPixelsToBuffer(): Promise; - - /** - * Obtains the type of auxiliary picture. - * - * @returns { AuxiliaryPictureType } Returns the type of auxiliary picture. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - getType(): AuxiliaryPictureType; - - /** - * Set the metadata of auxiliary picture. - * - * @param { MetadataType } metadataType The type of metadata. - * @param { Metadata } metadata The metadata of auxiliary picture. - * @returns { Promise } A Promise instance used to return the operation result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The - * metadata type does not match the auxiliary picture type. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - setMetadata(metadataType: MetadataType, metadata: Metadata): Promise - - /** - * Obtains the metadata of auxiliary picture. - * - * @param { MetadataType } metadataType The type of metadata. - * @returns { Promise } Return the metadata of auxiliary picture. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The - * metadata type does not match the auxiliary picture type. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - getMetadata(metadataType: MetadataType): Promise - - /** - * Releases this AuxiliaryPicture object. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - release():void - } - - /** - * Enumerates auxiliary picture type. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum AuxiliaryPictureType { - /** - * Gain map. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - GAINMAP = 1, - - /** - * Depth map. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - DEPTH_MAP = 2, - - /** - * Unrefocus map. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - UNREFOCUS_MAP = 3, - - /** - * Linear map. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - LINEAR_MAP = 4, - - /** - * Fragment map. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - FRAGMENT_MAP = 5, - } - - /** - * Enumerates metadata type. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - enum MetadataType { - /** - * EXIF metadata. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - EXIF_METADATA = 1, - - /** - * Fragment metadata. - * - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - FRAGMENT_METADATA = 2, - } - - /** - * Metadata instance. - * - * @typedef Metadata - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - interface Metadata { - /** - * Obtains the value of properties in an image. This method uses a promise to return the property values in array - * of records. - * - * @param { Array } key Name of the properties whose value is to be obtained. - * @returns { Promise> } Array of Records instance used to return the property values. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The - * metadata type does not match the auxiliary picture type. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - getProperties(key: Array): Promise> - - /** - * Modify the value of properties in an image with the specified keys. - * - * @param { Record } records Array of the property Records whose values are to - * be modified. - * @returns { Promise } A Promise instance used to return the operation result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. - * @throws { BusinessError } 7600202 - Unsupported metadata. Possible causes: 1. Unsupported metadata type. 2. The - * metadata type does not match the auxiliary picture type. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - setProperties(records: Record): Promise - - /** - * Obtains the value of all properties in an image. This method uses a promise to return the property values - * in array of records. - * - * @returns { Promise> } Array of Records instance used to return the property values. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - getAllProperties(): Promise> - - /** - * Obtains a clone of metadata. This method uses a promise to return the metadata. - * - * @returns { Promise } A Promise instance used to return the metadata. - * @throws { BusinessError } 7600301 - Memory alloc failed. - * @throws { BusinessError } 7600302 - Memory copy failed. - * @syscap SystemCapability.Multimedia.Image.Core - * @since 20 - */ - clone(): Promise - } - - /** - * ImageSource instance. - * - * @typedef ImageSource - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - interface ImageSource { - /** - * Get image information from image source. - * - * @param { int } index Sequence number of an image. If this parameter is not specified, the default value 0 is used. - * @returns { Promise } A Promise instance used to return the image information. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - getImageInfo(index?: int): Promise; - - /** - * Get image information from image source synchronously. - * - * @param { int } index - Index of sequence images. If this parameter is not specified, default value is 0. - * @returns { ImageInfo } The image information. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - getImageInfoSync(index?: int): ImageInfo; - - /** - * Creates a PixelMap object based on image decoding parameters. This method uses a promise to - * return the object. - * - * @param { DecodingOptions } options Image decoding parameters. - * @returns { Promise } A Promise instance used to return the PixelMap object. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - createPixelMap(options?: DecodingOptions): Promise; - - /** - * Create a PixelMap object based on image decoding parameters synchronously. - * - * @param { DecodingOptions } options - Image decoding parameters. - * @returns { PixelMap } Return the PixelMap. If decoding fails, return undefined. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - createPixelMapSync(options?: DecodingOptions): PixelMap; - - /** - * Releases an ImageSource instance and uses a promise to return the result. - * - * @returns { Promise } A Promise instance used to return the operation result. - * @syscap SystemCapability.Multimedia.Image.ImageSource - * @crossplatform - * @since 20 - */ - release(): Promise; - } - - /** - * ImagePacker instance. - * - * @typedef ImagePacker - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @atomicservice - * @since 20 - */ - interface ImagePacker { - /** - * Releases an ImagePacker instance and uses a promise to return the result. - * - * @returns { Promise } A Promise instance used to return the operation result. - * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @crossplatform - * @since 20 - */ - release(): Promise; - } -} - -export default image; diff --git a/api/@ohos.multimedia.image.d.ts b/api/@ohos.multimedia.image.d.ts index 05a0b2fbdb053ef796e944307cbab388e54525ab..7321b0382266846ea52e5717d9fc4b215373bf11 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -42,7 +42,8 @@ import type rpc from './@ohos.rpc'; * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace image { /** @@ -77,7 +78,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PixelMapFormat { /** @@ -108,7 +110,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -117,7 +120,8 @@ declare namespace image { * and are stored from the higher-order to the lower-order bits. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ARGB_8888 = 1, @@ -157,7 +161,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RGB_565 = 2, @@ -193,7 +198,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RGBA_8888 = 3, @@ -229,7 +235,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BGRA_8888 = 4, @@ -265,7 +272,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RGB_888 = 5, @@ -301,7 +309,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALPHA_8 = 6, @@ -337,7 +346,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RGBA_F16 = 7, @@ -373,7 +383,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NV21 = 8, @@ -409,7 +420,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NV12 = 9, @@ -418,7 +430,8 @@ declare namespace image { * R(10bits), G(10bits), B(10bits), A(2bits) and are stored from the higher-order to the lower-order bits. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RGBA_1010102 = 10, @@ -427,7 +440,8 @@ declare namespace image { * and are stored from the higher-order to the lower-order bits. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ YCBCR_P010 = 11, @@ -436,7 +450,8 @@ declare namespace image { * and are stored from the higher-order to the lower-order bits. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ YCRCB_P010 = 12, @@ -446,7 +461,8 @@ declare namespace image { * processing editing. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ASTC_4x4 = 102 } @@ -457,7 +473,8 @@ declare namespace image { * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ResolutionQuality { /** @@ -465,7 +482,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOW = 1, @@ -474,7 +492,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM = 2, @@ -483,7 +502,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 3 } @@ -520,7 +540,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Size { /** @@ -550,14 +571,15 @@ declare namespace image { /** * Height * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; /** * Width @@ -586,14 +608,15 @@ declare namespace image { /** * Width * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; } /** @@ -611,7 +634,8 @@ declare namespace image { * @enum { string } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum PropertyKey { /** @@ -627,7 +651,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ BITS_PER_SAMPLE = 'BitsPerSample', @@ -664,7 +689,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ORIENTATION = 'Orientation', @@ -679,7 +705,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_LENGTH = 'ImageLength', @@ -694,7 +721,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_WIDTH = 'ImageWidth', @@ -715,7 +743,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_LATITUDE = 'GPSLatitude', @@ -736,7 +765,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_LONGITUDE = 'GPSLongitude', @@ -751,7 +781,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_LATITUDE_REF = 'GPSLatitudeRef', @@ -766,7 +797,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_LONGITUDE_REF = 'GPSLongitudeRef', @@ -783,7 +815,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_TIME_ORIGINAL = 'DateTimeOriginal', @@ -798,7 +831,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_TIME = 'ExposureTime', @@ -813,7 +847,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_TYPE = 'SceneType', @@ -828,7 +863,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ISO_SPEED_RATINGS = 'ISOSpeedRatings', @@ -843,7 +879,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ F_NUMBER = 'FNumber', @@ -852,7 +889,8 @@ declare namespace image { * is "YYYY:MM:DD HH:MM:SS" with time shown in 24-hour format. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_TIME = 'DateTime', @@ -860,7 +898,8 @@ declare namespace image { * GPS time stamp * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_TIME_STAMP = 'GPSTimeStamp', @@ -868,7 +907,8 @@ declare namespace image { * GPS date stamp * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DATE_STAMP = 'GPSDateStamp', @@ -876,7 +916,8 @@ declare namespace image { * Image description * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_DESCRIPTION = 'ImageDescription', @@ -884,7 +925,8 @@ declare namespace image { * Make * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ MAKE = 'Make', @@ -892,7 +934,8 @@ declare namespace image { * Model * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ MODEL = 'Model', @@ -900,7 +943,8 @@ declare namespace image { * Photo mode * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ PHOTO_MODE = 'PhotoMode', @@ -908,7 +952,8 @@ declare namespace image { * Sensitivity type * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SENSITIVITY_TYPE = 'SensitivityType', @@ -916,7 +961,8 @@ declare namespace image { * Standard output sensitivity * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD_OUTPUT_SENSITIVITY = 'StandardOutputSensitivity', @@ -924,7 +970,8 @@ declare namespace image { * Recommended exposure index * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ RECOMMENDED_EXPOSURE_INDEX = 'RecommendedExposureIndex', @@ -932,7 +979,8 @@ declare namespace image { * Indicates the ISO Speed and ISO Latitude of the camera or input device as specified in ISO 12232. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ISO_SPEED = 'ISOSpeedRatings', @@ -940,7 +988,8 @@ declare namespace image { * The lens aperture. The unit is the APEX((Additive System of Photographic Exposure) value. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ APERTURE_VALUE = 'ApertureValue', @@ -948,7 +997,8 @@ declare namespace image { * Exposure bias value * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_BIAS_VALUE = 'ExposureBiasValue', @@ -956,7 +1006,8 @@ declare namespace image { * Metering mode * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ METERING_MODE = 'MeteringMode', @@ -964,7 +1015,8 @@ declare namespace image { * Light source * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT_SOURCE = 'LightSource', @@ -972,7 +1024,8 @@ declare namespace image { * Flash * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH = 'Flash', @@ -980,7 +1033,8 @@ declare namespace image { * Focal length * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ FOCAL_LENGTH = 'FocalLength', @@ -988,7 +1042,8 @@ declare namespace image { * User comment * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ USER_COMMENT = 'UserComment', @@ -996,7 +1051,8 @@ declare namespace image { * Pixel x dimension * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_X_DIMENSION = 'PixelXDimension', @@ -1004,7 +1060,8 @@ declare namespace image { * Pixel y dimension * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ PIXEL_Y_DIMENSION = 'PixelYDimension', @@ -1012,7 +1069,8 @@ declare namespace image { * White balance * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ WHITE_BALANCE = 'WhiteBalance', @@ -1020,7 +1078,8 @@ declare namespace image { * Focal length in 35mm film * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ FOCAL_LENGTH_IN_35_MM_FILM = 'FocalLengthIn35mmFilm', @@ -1028,7 +1087,8 @@ declare namespace image { * Capture mode * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ CAPTURE_MODE = 'HwMnoteCaptureMode', @@ -1036,7 +1096,8 @@ declare namespace image { * Physical aperture * * @syscap SystemCapability.Multimedia.Image.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ PHYSICAL_APERTURE = 'HwMnotePhysicalAperture', @@ -1045,7 +1106,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ROLL_ANGLE = 'HwMnoteRollAngle', @@ -1054,7 +1116,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PITCH_ANGLE = 'HwMnotePitchAngle', @@ -1063,7 +1126,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_FOOD_CONF = 'HwMnoteSceneFoodConf', @@ -1072,7 +1136,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_STAGE_CONF = 'HwMnoteSceneStageConf', @@ -1081,7 +1146,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_BLUE_SKY_CONF = 'HwMnoteSceneBlueSkyConf', @@ -1090,7 +1156,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_GREEN_PLANT_CONF = 'HwMnoteSceneGreenPlantConf', @@ -1099,7 +1166,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_BEACH_CONF = 'HwMnoteSceneBeachConf', @@ -1108,7 +1176,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_SNOW_CONF = 'HwMnoteSceneSnowConf', @@ -1117,7 +1186,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_SUNSET_CONF = 'HwMnoteSceneSunsetConf', @@ -1126,7 +1196,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_FLOWERS_CONF = 'HwMnoteSceneFlowersConf', @@ -1135,7 +1206,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_NIGHT_CONF = 'HwMnoteSceneNightConf', @@ -1144,7 +1216,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_TEXT_CONF = 'HwMnoteSceneTextConf', @@ -1153,7 +1226,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_COUNT = 'HwMnoteFaceCount', @@ -1162,7 +1236,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_MODE = 'HwMnoteFocusMode', @@ -1171,7 +1246,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPRESSION = 'Compression', @@ -1180,7 +1256,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHOTOMETRIC_INTERPRETATION = 'PhotometricInterpretation', @@ -1189,7 +1266,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STRIP_OFFSETS = 'StripOffsets', @@ -1199,7 +1277,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLES_PER_PIXEL = 'SamplesPerPixel', @@ -1208,7 +1287,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ROWS_PER_STRIP = 'RowsPerStrip', @@ -1217,7 +1297,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STRIP_BYTE_COUNTS = 'StripByteCounts', @@ -1226,7 +1307,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ X_RESOLUTION = 'XResolution', @@ -1235,7 +1317,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ Y_RESOLUTION = 'YResolution', @@ -1244,7 +1327,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLANAR_CONFIGURATION = 'PlanarConfiguration', @@ -1253,7 +1337,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RESOLUTION_UNIT = 'ResolutionUnit', @@ -1262,7 +1347,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSFER_FUNCTION = 'TransferFunction', @@ -1271,7 +1357,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOFTWARE = 'Software', @@ -1280,7 +1367,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ARTIST = 'Artist', @@ -1289,7 +1377,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WHITE_POINT = 'WhitePoint', @@ -1298,7 +1387,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIMARY_CHROMATICITIES = 'PrimaryChromaticities', @@ -1307,7 +1397,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ YCBCR_COEFFICIENTS = 'YCbCrCoefficients', @@ -1316,7 +1407,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ YCBCR_SUB_SAMPLING = 'YCbCrSubSampling', @@ -1325,7 +1417,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ YCBCR_POSITIONING = 'YCbCrPositioning', @@ -1334,7 +1427,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REFERENCE_BLACK_WHITE = 'ReferenceBlackWhite', @@ -1343,7 +1437,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COPYRIGHT = 'Copyright', @@ -1352,7 +1447,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ JPEG_INTERCHANGE_FORMAT = 'JPEGInterchangeFormat', @@ -1361,7 +1457,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ JPEG_INTERCHANGE_FORMAT_LENGTH = 'JPEGInterchangeFormatLength', @@ -1370,7 +1467,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_PROGRAM = 'ExposureProgram', @@ -1379,7 +1477,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPECTRAL_SENSITIVITY = 'SpectralSensitivity', @@ -1388,7 +1487,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OECF = 'OECF', @@ -1397,7 +1497,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXIF_VERSION = 'ExifVersion', @@ -1408,7 +1509,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DATE_TIME_DIGITIZED = 'DateTimeDigitized', @@ -1417,7 +1519,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPONENTS_CONFIGURATION = 'ComponentsConfiguration', @@ -1426,7 +1529,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHUTTER_SPEED = 'ShutterSpeedValue', @@ -1435,7 +1539,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BRIGHTNESS_VALUE = 'BrightnessValue', @@ -1444,7 +1549,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MAX_APERTURE_VALUE = 'MaxApertureValue', @@ -1453,7 +1559,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT_DISTANCE = 'SubjectDistance', @@ -1462,7 +1569,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT_AREA = 'SubjectArea', @@ -1471,7 +1579,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MAKER_NOTE = 'MakerNote', @@ -1480,7 +1589,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBSEC_TIME = 'SubsecTime', @@ -1489,7 +1599,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBSEC_TIME_ORIGINAL = 'SubsecTimeOriginal', @@ -1498,7 +1609,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBSEC_TIME_DIGITIZED = 'SubsecTimeDigitized', @@ -1507,7 +1619,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLASHPIX_VERSION = 'FlashpixVersion', @@ -1516,7 +1629,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_SPACE = 'ColorSpace', @@ -1525,7 +1639,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RELATED_SOUND_FILE = 'RelatedSoundFile', @@ -1534,7 +1649,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH_ENERGY = 'FlashEnergy', @@ -1543,7 +1659,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_FREQUENCY_RESPONSE = 'SpatialFrequencyResponse', @@ -1552,7 +1669,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOCAL_PLANE_X_RESOLUTION = 'FocalPlaneXResolution', @@ -1561,7 +1679,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOCAL_PLANE_Y_RESOLUTION = 'FocalPlaneYResolution', @@ -1570,7 +1689,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FOCAL_PLANE_RESOLUTION_UNIT = 'FocalPlaneResolutionUnit', @@ -1579,7 +1699,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT_LOCATION = 'SubjectLocation', @@ -1588,7 +1709,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_INDEX = 'ExposureIndex', @@ -1597,7 +1719,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SENSING_METHOD = 'SensingMethod', @@ -1606,7 +1729,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FILE_SOURCE = 'FileSource', @@ -1615,7 +1739,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CFA_PATTERN = 'CFAPattern', @@ -1624,7 +1749,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOM_RENDERED = 'CustomRendered', @@ -1633,7 +1759,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_MODE = 'ExposureMode', @@ -1642,7 +1769,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DIGITAL_ZOOM_RATIO = 'DigitalZoomRatio', @@ -1651,7 +1779,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_CAPTURE_TYPE = 'SceneCaptureType', @@ -1660,7 +1789,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GAIN_CONTROL = 'GainControl', @@ -1669,7 +1799,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTRAST = 'Contrast', @@ -1678,7 +1809,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SATURATION = 'Saturation', @@ -1687,7 +1819,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHARPNESS = 'Sharpness', @@ -1696,7 +1829,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_SETTING_DESCRIPTION = 'DeviceSettingDescription', @@ -1705,7 +1839,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBJECT_DISTANCE_RANGE = 'SubjectDistanceRange', @@ -1714,7 +1849,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE_UNIQUE_ID = 'ImageUniqueID', @@ -1723,7 +1859,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_VERSION_ID = 'GPSVersionID', @@ -1732,7 +1869,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_ALTITUDE_REF = 'GPSAltitudeRef', @@ -1741,7 +1879,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_ALTITUDE = 'GPSAltitude', @@ -1750,7 +1889,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_SATELLITES = 'GPSSatellites', @@ -1759,7 +1899,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_STATUS = 'GPSStatus', @@ -1768,7 +1909,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_MEASURE_MODE = 'GPSMeasureMode', @@ -1777,7 +1919,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DOP = 'GPSDOP', @@ -1786,7 +1929,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_SPEED_REF = 'GPSSpeedRef', @@ -1795,7 +1939,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_SPEED = 'GPSSpeed', @@ -1804,7 +1949,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_TRACK_REF = 'GPSTrackRef', @@ -1813,7 +1959,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_TRACK = 'GPSTrack', @@ -1822,7 +1969,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_IMG_DIRECTION_REF = 'GPSImgDirectionRef', @@ -1831,7 +1979,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_IMG_DIRECTION = 'GPSImgDirection', @@ -1840,7 +1989,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_MAP_DATUM = 'GPSMapDatum', @@ -1849,7 +1999,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_LATITUDE_REF = 'GPSDestLatitudeRef', @@ -1858,7 +2009,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_LATITUDE = 'GPSDestLatitude', @@ -1867,7 +2019,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_LONGITUDE_REF = 'GPSDestLongitudeRef', @@ -1876,7 +2029,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_LONGITUDE = 'GPSDestLongitude', @@ -1885,7 +2039,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_BEARING_REF = 'GPSDestBearingRef', @@ -1894,7 +2049,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_BEARING = 'GPSDestBearing', @@ -1903,7 +2059,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_DISTANCE_REF = 'GPSDestDistanceRef', @@ -1912,7 +2069,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DEST_DISTANCE = 'GPSDestDistance', @@ -1921,7 +2079,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_PROCESSING_METHOD = 'GPSProcessingMethod', @@ -1930,7 +2089,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_AREA_INFORMATION = 'GPSAreaInformation', @@ -1939,7 +2099,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_DIFFERENTIAL = 'GPSDifferential', @@ -1948,7 +2109,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BODY_SERIAL_NUMBER = 'BodySerialNumber', @@ -1957,7 +2119,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_OWNER_NAME = 'CameraOwnerName', @@ -1966,7 +2129,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPOSITE_IMAGE = 'CompositeImage', @@ -1975,7 +2139,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ COMPRESSED_BITS_PER_PIXEL = 'CompressedBitsPerPixel', @@ -1984,7 +2149,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DNG_VERSION = 'DNGVersion', @@ -1993,7 +2159,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT_CROP_SIZE = 'DefaultCropSize', @@ -2002,7 +2169,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GAMMA = 'Gamma', @@ -2011,7 +2179,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ISO_SPEED_LATITUDE_YYY = 'ISOSpeedLatitudeyyy', @@ -2020,7 +2189,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ISO_SPEED_LATITUDE_ZZZ = 'ISOSpeedLatitudezzz', @@ -2029,7 +2199,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LENS_MAKE = 'LensMake', @@ -2038,7 +2209,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LENS_MODEL = 'LensModel', @@ -2047,7 +2219,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LENS_SERIAL_NUMBER = 'LensSerialNumber', @@ -2056,7 +2229,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LENS_SPECIFICATION = 'LensSpecification', @@ -2065,7 +2239,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEW_SUBFILE_TYPE = 'NewSubfileType', @@ -2074,7 +2249,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSET_TIME = 'OffsetTime', @@ -2083,7 +2259,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSET_TIME_DIGITIZED = 'OffsetTimeDigitized', @@ -2092,7 +2269,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OFFSET_TIME_ORIGINAL = 'OffsetTimeOriginal', @@ -2101,7 +2279,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = 'SourceExposureTimesOfCompositeImage', @@ -2110,7 +2289,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = 'SourceImageNumberOfCompositeImage', @@ -2119,7 +2299,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SUBFILE_TYPE = 'SubfileType', @@ -2128,7 +2309,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GPS_H_POSITIONING_ERROR = 'GPSHPositioningError', @@ -2137,7 +2319,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHOTOGRAPHIC_SENSITIVITY = 'PhotographicSensitivity', @@ -2146,7 +2329,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BURST_NUMBER = 'HwMnoteBurstNumber', @@ -2155,7 +2339,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_CONF = 'HwMnoteFaceConf', @@ -2164,7 +2349,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_LEYE_CENTER = 'HwMnoteFaceLeyeCenter', @@ -2173,7 +2359,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_MOUTH_CENTER = 'HwMnoteFaceMouthCenter', @@ -2182,7 +2369,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_POINTER = 'HwMnoteFacePointer', @@ -2191,7 +2379,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_RECT = 'HwMnoteFaceRect', @@ -2200,7 +2389,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_REYE_CENTER = 'HwMnoteFaceReyeCenter', @@ -2209,7 +2399,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_SMILE_SCORE = 'HwMnoteFaceSmileScore', @@ -2218,7 +2409,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_VERSION = 'HwMnoteFaceVersion', @@ -2227,7 +2419,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FRONT_CAMERA = 'HwMnoteFrontCamera', @@ -2236,7 +2429,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_POINTER = 'HwMnoteScenePointer', @@ -2245,7 +2439,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCENE_VERSION = 'HwMnoteSceneVersion', @@ -2254,7 +2449,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IS_XMAGE_SUPPORTED = 'HwMnoteIsXmageSupported', @@ -2263,7 +2459,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XMAGE_MODE = 'HwMnoteXmageMode', @@ -2272,7 +2469,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XMAGE_LEFT = 'HwMnoteXmageLeft', @@ -2281,7 +2479,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XMAGE_TOP = 'HwMnoteXmageTop', @@ -2290,7 +2489,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XMAGE_RIGHT = 'HwMnoteXmageRight', @@ -2299,7 +2499,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ XMAGE_BOTTOM = 'HwMnoteXmageBottom', @@ -2308,7 +2509,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLOUD_ENHANCEMENT_MODE = 'HwMnoteCloudEnhancementMode', @@ -2317,7 +2519,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WIND_SNAPSHOT_MODE = 'HwMnoteWindSnapshotMode', @@ -2327,7 +2530,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GIF_LOOP_COUNT = 'GIFLoopCount' } @@ -2337,14 +2541,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum ImageFormat { /** * YCBCR422 semi-planar format. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ YCBCR_422_SP = 1000, @@ -2352,7 +2558,8 @@ declare namespace image { * JPEG encoding format. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ JPEG = 2000 } @@ -2389,7 +2596,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AlphaType { /** @@ -2420,7 +2628,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -2452,7 +2661,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OPAQUE = 1, @@ -2484,7 +2694,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PREMUL = 2, @@ -2516,7 +2727,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ UNPREMUL = 3 } @@ -2526,7 +2738,8 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DecodingDynamicRange { /** @@ -2535,7 +2748,8 @@ declare namespace image { * Imagesources created via {@link CreateIncrementalSource} will be decoded as SDR content. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -2543,7 +2757,8 @@ declare namespace image { * Decoding to standard dynamic range. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SDR = 1, @@ -2551,7 +2766,8 @@ declare namespace image { * Decoding to high dynamic range. Imagesources created via {@link CreateIncrementalSource} will be decoded as SDR content. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HDR = 2 } @@ -2561,7 +2777,8 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PackingDynamicRange { /** @@ -2569,7 +2786,8 @@ declare namespace image { * otherwise, it will be encoded as SDR content. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -2577,7 +2795,8 @@ declare namespace image { * Packing to standard dynamic range. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SDR = 1, } @@ -2585,17 +2804,18 @@ declare namespace image { /** * Enumerates the anti-aliasing level. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 12 */ /** * Enumerates the anti-aliasing level. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum AntiAliasingLevel { /** @@ -2609,7 +2829,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -2624,7 +2845,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ LOW = 1, @@ -2639,7 +2861,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIUM = 2, @@ -2654,7 +2877,8 @@ declare namespace image { * * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 3, } @@ -2662,14 +2886,14 @@ declare namespace image { /** * Enum for image scale mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Enum for image scale mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -2677,7 +2901,7 @@ declare namespace image { /** * Enum for image scale mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -2686,12 +2910,13 @@ declare namespace image { /** * Enum for image scale mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ScaleMode { /** @@ -2722,7 +2947,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FIT_TARGET_SIZE = 0, @@ -2754,7 +2980,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER_CROP = 1 } @@ -2764,14 +2991,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum ComponentType { /** * Luma info. * * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ YUV_Y = 1, @@ -2779,7 +3008,8 @@ declare namespace image { * Chrominance info. * * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ YUV_U = 2, @@ -2787,7 +3017,8 @@ declare namespace image { * Chroma info. * * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ YUV_V = 3, @@ -2795,7 +3026,8 @@ declare namespace image { * Jpeg type. * * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ JPEG = 4 } @@ -2805,14 +3037,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum HdrMetadataKey { /** * Indicate the types of metadata that image needs to use. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HDR_METADATA_TYPE = 0, @@ -2820,7 +3054,8 @@ declare namespace image { * Static metadata key. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HDR_STATIC_METADATA = 1, @@ -2828,7 +3063,8 @@ declare namespace image { * Dynamic metadata key. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HDR_DYNAMIC_METADATA = 2, @@ -2836,7 +3072,8 @@ declare namespace image { * Gainmap metadata key. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HDR_GAINMAP_METADATA = 3, } @@ -2846,14 +3083,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum HdrMetadataType { /** * No metadata. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -2861,7 +3100,8 @@ declare namespace image { * Indicates that metadata will be used for the base image. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BASE = 1, @@ -2869,7 +3109,8 @@ declare namespace image { * Indicates that metadata will be used for the gainmap image. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ GAINMAP = 2, @@ -2877,7 +3118,8 @@ declare namespace image { * Indicates that metadata will be used for the alternate image. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALTERNATE = 3, } @@ -2887,14 +3129,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enum AllocatorType { /** * The system determines which memory to use to create the PixelMap. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -2902,7 +3146,8 @@ declare namespace image { * Use DMA buffer to create the PixelMap. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ DMA = 1, @@ -2910,7 +3155,8 @@ declare namespace image { * Use share memory to create the PixelMap. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_MEMORY = 2, } @@ -2947,7 +3193,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Region { /** @@ -2982,7 +3229,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size; @@ -3013,14 +3261,15 @@ declare namespace image { /** * x-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - x: number; + x: int; /** * y-coordinate at the upper left corner of the image. @@ -3049,14 +3298,15 @@ declare namespace image { /** * y-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - y: number; + y: int; } /** @@ -3091,7 +3341,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PositionArea { /** @@ -3126,7 +3377,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixels: ArrayBuffer; @@ -3157,14 +3409,15 @@ declare namespace image { /** * Offset for data reading. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * Number of bytes to read. @@ -3193,14 +3446,15 @@ declare namespace image { /** * Number of bytes to read. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - stride: number; + stride: int; /** * Region to read. @@ -3234,7 +3488,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ region: Region; } @@ -3271,7 +3526,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageInfo { /** @@ -3306,7 +3562,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size; @@ -3337,14 +3594,15 @@ declare namespace image { /** * Indicates image default density. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - density: number; + density: int; /** * The number of byte per row. @@ -3357,13 +3615,14 @@ declare namespace image { /** * The number of byte per row. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - stride: number; + stride: int; /** * Indicates image format. @@ -3373,7 +3632,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelFormat: PixelMapFormat; @@ -3385,7 +3645,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alphaType: AlphaType; @@ -3395,7 +3656,8 @@ declare namespace image { * @type { string } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mimeType: string; @@ -3404,7 +3666,8 @@ declare namespace image { * * @type { boolean } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHdr: boolean; } @@ -3414,14 +3677,16 @@ declare namespace image { * * @enum { number } * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum CropAndScaleStrategy { /** * Scales and then crops the image. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCALE_FIRST = 1, @@ -3429,7 +3694,8 @@ declare namespace image { * Crops and then scales the image. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CROP_FIRST = 2 } @@ -3456,7 +3722,8 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PackingOption { /** @@ -3481,7 +3748,8 @@ declare namespace image { * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ format: string; @@ -3503,13 +3771,14 @@ declare namespace image { /** * Quality of the target image. The value is an integer ranging from 0 to 100. A larger value indicates better. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - quality: number; + quality: int; /** * BufferSize of the target image. @@ -3532,20 +3801,22 @@ declare namespace image { * BufferSize of the target image. * If this bufferSize is less than or equal to 0, it will be converted to 10MB. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - bufferSize?: number; + bufferSize?: int; /** * The desired dynamic range of the target image. * * @type { ?PackingDynamicRange } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredDynamicRange?: PackingDynamicRange; @@ -3554,7 +3825,8 @@ declare namespace image { * * @type { ?boolean } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ needsPackProperties?: boolean; } @@ -3675,18 +3947,20 @@ declare namespace image { * @typedef ImagePropertyOptions * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImagePropertyOptions { /** * Index of an image. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - index?: number; + index?: int; /** * Default property value. @@ -3694,7 +3968,8 @@ declare namespace image { * @type { ?string } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ defaultValue?: string; } @@ -3731,7 +4006,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DecodingOptions { /** @@ -3761,14 +4037,15 @@ declare namespace image { /** * Number of image frames. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - index?: number; + index?: int; /** * Sampling ratio of the image pixel map. @@ -3797,14 +4074,15 @@ declare namespace image { /** * Sampling ratio of the image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - sampleSize?: number; + sampleSize?: int; /** * Rotation angle of the image pixel map. The value ranges from 0 to 360. @@ -3833,14 +4111,15 @@ declare namespace image { /** * Rotation angle of the image pixel map. The value ranges from 0 to 360. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - rotate?: number; + rotate?: int; /** * Whether the image pixel map is editable. @@ -3874,7 +4153,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editable?: boolean; @@ -3914,7 +4194,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredSize?: Size; @@ -3950,7 +4231,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredRegion?: Region; @@ -3986,7 +4268,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredPixelFormat?: PixelMapFormat; @@ -4017,14 +4300,15 @@ declare namespace image { /** * The density for image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - fitDensity?: number; + fitDensity?: int; /** * Color space of the image pixel map. @@ -4032,7 +4316,8 @@ declare namespace image { * @type { ?colorSpaceManager.ColorSpaceManager } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredColorSpace?: colorSpaceManager.ColorSpaceManager; @@ -4041,7 +4326,8 @@ declare namespace image { * * @type { ?DecodingDynamicRange } * @syscap SystemCapability.Multimedia.Image.ImageSource - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredDynamicRange?: DecodingDynamicRange; @@ -4051,7 +4337,8 @@ declare namespace image { * @type { ?ResolutionQuality } * @syscap SystemCapability.Multimedia.Image.ImageSource * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ resolutionQuality?: ResolutionQuality; @@ -4060,7 +4347,8 @@ declare namespace image { * * @type { ?CropAndScaleStrategy } * @syscap SystemCapability.Multimedia.Image.ImageSource - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ cropAndScaleStrategy?: CropAndScaleStrategy; } @@ -4070,7 +4358,8 @@ declare namespace image { * * @typedef Component * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface Component { /** @@ -4079,29 +4368,32 @@ declare namespace image { * @type { ComponentType } * @readonly * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly componentType: ComponentType; /** * Row stride. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly rowStride: number; + readonly rowStride: int; /** * Pixel stride. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly pixelStride: number; + readonly pixelStride: int; /** * Component buffer. @@ -4109,7 +4401,8 @@ declare namespace image { * @type { ArrayBuffer } * @readonly * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly byteBuffer: ArrayBuffer; } @@ -4146,7 +4439,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface InitializationOptions { /** @@ -4181,7 +4475,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size; @@ -4190,7 +4485,8 @@ declare namespace image { * * @type { ?PixelMapFormat } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ srcPixelFormat?: PixelMapFormat; @@ -4226,7 +4522,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pixelFormat?: PixelMapFormat; @@ -4262,7 +4559,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ editable?: boolean; @@ -4298,7 +4596,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ alphaType?: AlphaType; @@ -4334,7 +4633,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ scaleMode?: ScaleMode; } @@ -4371,7 +4671,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SourceOptions { /** @@ -4401,14 +4702,15 @@ declare namespace image { /** * The density for ImageSource. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - sourceDensity: number; + sourceDensity: int; /** * PixelMap expected format. @@ -4442,7 +4744,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sourcePixelFormat?: PixelMapFormat; @@ -4478,7 +4781,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sourceSize?: Size; } @@ -4726,7 +5030,8 @@ declare namespace image { * @param { AsyncCallback } callback Callback used to return the PixelMap object. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: AsyncCallback): void; @@ -4747,7 +5052,8 @@ declare namespace image { * @returns { Promise } A Promise instance used to return the PixelMap object. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise; @@ -4761,7 +5067,8 @@ declare namespace image { * 2.Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createPixelMapSync(colors: ArrayBuffer, options: InitializationOptions): PixelMap; @@ -4812,7 +5119,8 @@ declare namespace image { * 2.Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createPixelMapSync(options: InitializationOptions): PixelMap; @@ -4936,7 +5244,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -4951,7 +5260,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5525,7 +5848,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5909,7 +6236,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5922,7 +6250,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6045,7 +6376,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6054,7 +6385,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6064,20 +6395,21 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - opacity(rate: number, callback: AsyncCallback): void; + opacity(rate: double, callback: AsyncCallback): void; /** * Set the transparent rate of pixel map. This method uses a promise to return the result. * - * @param { number } rate The value of transparent rate. + * @param { double } rate The value of transparent rate. * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6085,7 +6417,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6094,7 +6426,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6104,29 +6436,31 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - opacity(rate: number): Promise; + opacity(rate: double): Promise; /** * Set the transparent rate of pixel map. * - * @param { number } rate The value of transparent rate. + * @param { double } rate The value of transparent rate. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - opacitySync(rate: number): void; + opacitySync(rate: double): void; /** * Obtains new pixel map with alpha information. This method uses a promise to return the information. * @@ -6159,7 +6493,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6195,7 +6530,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6208,14 +6544,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6223,8 +6560,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6233,8 +6570,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6244,22 +6581,23 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - scale(x: number, y: number, callback: AsyncCallback): void; + scale(x: double, y: double, callback: AsyncCallback): void; /** * Image zoom in width and height. This method uses a promise to return the result. * - * @param { number } x The zoom value of width. - * @param { number } y The zoom value of height. + * @param { double } x The zoom value of width. + * @param { double } y The zoom value of height. * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6267,8 +6605,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6277,8 +6615,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6288,37 +6626,39 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - scale(x: number, y: number): Promise; + scale(x: double, y: double): Promise; /** * Image zoom in width and height. * - * @param { number } x The zoom value of width. - * @param { number } y The zoom value of height. + * @param { double } x The zoom value of width. + * @param { double } y The zoom value of height. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - scaleSync(x: number, y: number): void; + scaleSync(x: double, y: double): void; /** * Image zoom in width and height width with anti-aliasing. This method uses a promise to return the result. * - * @param { number } x The zoom value of width. - * @param { number } y The zoom value of height. + * @param { double } x The zoom value of width. + * @param { double } y The zoom value of height. * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. @@ -6328,15 +6668,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + scale(x: double, y: double, level: AntiAliasingLevel): Promise; /** * Image zoom in width and height with anti-aliasing. * - * @param { number } x The zoom value of width. - * @param { number } y The zoom value of height. + * @param { double } x The zoom value of width. + * @param { double } y The zoom value of height. * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. @@ -6344,45 +6685,48 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the new scaled pixelmap. If the operation fails, an error message is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - createScaledPixelMap(x: number, y: number, level?: AntiAliasingLevel): Promise; + createScaledPixelMap(x: double, y: double, level?: AntiAliasingLevel): Promise; /** * Create a new scaled pixelmap based on this image zoom in width and height with anti-aliasing. * - * @param { number } x The zoom value of width. - * @param { number } y The zoom value of height. + * @param { double } x The zoom value of width. + * @param { double } y The zoom value of height. * @param { AntiAliasingLevel } level The anti-aliasing algorithm to be used. * @returns { PixelMap } return the new scaled pixelmap. If the operation fails, an error message is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - createScaledPixelMapSync(x: number, y: number, level?: AntiAliasingLevel): PixelMap; + createScaledPixelMapSync(x: double, y: double, level?: AntiAliasingLevel): PixelMap; /** * Image position transformation. This method uses a callback to return the operation result. * - * @param { number } x The position value of width. - * @param { number } y The position value of height. + * @param { double } x The position value of width. + * @param { double } y The position value of height. * @param { AsyncCallback } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6390,8 +6734,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6400,8 +6744,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6411,22 +6755,23 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - translate(x: number, y: number, callback: AsyncCallback): void; + translate(x: double, y: double, callback: AsyncCallback): void; /** * Image position transformation. This method uses a promise to return the result. * - * @param { number } x The position value of width. - * @param { number } y The position value of height. + * @param { double } x The position value of width. + * @param { double } y The position value of height. * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6434,8 +6779,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6444,8 +6789,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6455,36 +6800,38 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - translate(x: number, y: number): Promise; + translate(x: double, y: double): Promise; /** * Image position transformation. * - * @param { number } x The position value of width. - * @param { number } y The position value of height. + * @param { double } x The position value of width. + * @param { double } y The position value of height. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - translateSync(x: number, y: number): void; + translateSync(x: double, y: double): void; /** * Image rotation. This method uses a callback to return the operation result. * - * @param { number } angle The rotation angle. + * @param { double } angle The rotation angle. * @param { AsyncCallback } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6492,7 +6839,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6501,7 +6848,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6511,20 +6858,21 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rotate(angle: number, callback: AsyncCallback): void; + rotate(angle: double, callback: AsyncCallback): void; /** * Image rotation. This method uses a promise to return the result. * - * @param { number } angle The rotation angle. + * @param { double } angle The rotation angle. * @returns { Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -6532,7 +6880,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6541,7 +6889,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -6551,29 +6899,31 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. If the operation fails, an error message is returned. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rotate(angle: number): Promise; + rotate(angle: double): Promise; /** * Image rotation. * - * @param { number } angle The rotation angle. + * @param { double } angle The rotation angle. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 501 - Resource Unavailable. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rotateSync(angle: number): void; + rotateSync(angle: double): void; /** * Image flipping. This method uses a callback to return the operation result. @@ -6615,7 +6965,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6659,7 +7010,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6674,7 +7026,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6754,7 +7108,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6768,7 +7123,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6996,7 +7354,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7036,7 +7395,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7285,7 +7652,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the pixel map data. * @syscap SystemCapability.Multimedia.Image.Core - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readPixelsToBuffer(): Promise; @@ -7294,7 +7662,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7323,7 +7693,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7351,7 +7722,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise> @@ -7480,7 +7863,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise @@ -7490,7 +7874,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise> } Array of Records instance used to return the property values. * @syscap SystemCapability.Multimedia.Image.Core - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getAllProperties(): Promise> @@ -7499,7 +7884,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the metadata. * @syscap SystemCapability.Multimedia.Image.Core - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ clone(): Promise } @@ -7516,7 +7902,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getImageInfo(index: number, callback: AsyncCallback): void; + getImageInfo(index: int, callback: AsyncCallback): void; /** * Obtains information about this image and uses a callback to return the result. @@ -7760,7 +8156,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7800,30 +8197,28 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getImageInfo(index?: number): Promise; + getImageInfo(index?: int): Promise; /** * Get image information from image source synchronously. * - * @param { number } index Sequence number of an image. The default value is 0, indicating the first image. - * When the value is N, it refers to the (N-1)th image. In single-frame image scenarios, the value must be 0. - * In multi-frame image scenarios such as animations, the valid range is 0 to (frame count - 1). + * @param { int } index - Index of sequence images. If this parameter is not specified, default value is 0. * @returns { ImageInfo } The image information. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getImageInfoSync(index?: number): ImageInfo; + getImageInfoSync(index?: int): ImageInfo; /** * Creates a PixelMap object based on image decoding parameters. This method uses a promise to @@ -7865,7 +8260,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7901,7 +8297,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7945,7 +8342,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7971,7 +8369,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7982,7 +8381,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>; @@ -8110,7 +8512,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; @@ -8162,7 +8565,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; @@ -8186,7 +8590,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise> } A Promise instance used to return the array. + * @returns { Promise> } A Promise instance used to return the array. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980110 - The image source data is incorrect. @@ -8198,9 +8602,10 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>; + getDelayTimeList(): Promise>; /** * Obtains the array of delay time in an image. This method uses a callback to return the array. @@ -8222,12 +8627,11 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise> } callback Callback used to return the array. + * @param { AsyncCallback> } callback Callback used to return the array. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980110 - The image source data is incorrect. - * @throws { BusinessError } 62980113 - Unknown image format. - * The image data provided is not in a recognized or supported format, or it may be occorrupted. + * @throws { BusinessError } 62980111 - The image source data is incomplete. * @throws { BusinessError } 62980115 - Invalid image parameter. * @throws { BusinessError } 62980116 - Failed to decode the image. * @throws { BusinessError } 62980118 - Failed to create the image plugin. @@ -8235,9 +8639,10 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; + getDelayTimeList(callback: AsyncCallback>): void; /** * Obtains the array of disposal type in a gif image. This method uses a promise to return the array. @@ -8382,7 +8787,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -8481,7 +8887,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise>; @@ -8529,7 +8936,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -8600,7 +9008,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise; @@ -8697,7 +9106,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -8714,7 +9124,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -8780,7 +9191,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; } @@ -8807,7 +9219,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the operation result. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. @@ -9044,15 +9457,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + packToFile(source: ImageSource, fd: int, options: PackingOption, callback: AsyncCallback): void; /** * Compresses or packs an image into a file and uses a promise to return the result. * * @param { ImageSource } source Image to be processed. - * @param { number } fd ID of a file descriptor. + * @param { int } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @returns { Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. @@ -9068,15 +9482,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + packToFile(source: ImageSource, fd: int, options: PackingOption): Promise; /** * Compresses or packs an image into a file and uses a callback to return the result. * * @param { PixelMap } source PixelMap to be processed. - * @param { number } fd ID of a file descriptor. + * @param { int } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @param { AsyncCallback } callback Callback used to return the operation result. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. @@ -9092,15 +9507,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + packToFile(source: PixelMap, fd: int, options: PackingOption, callback: AsyncCallback): void; /** * Compresses or packs an image into a file and uses a promise to return the result. * * @param { PixelMap } source PixelMap to be processed. - * @param { number } fd ID of a file descriptor. + * @param { int } fd ID of a file descriptor. * @param { PackingOption } options Options for image packing. * @returns { Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. @@ -9116,9 +9532,10 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + packToFile(source: PixelMap, fd: int, options: PackingOption): Promise; /** * Compresses a Pixelmap sequence into gif. @@ -9148,7 +9565,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -9165,7 +9583,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImagePacker * @crossplatform - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -9179,7 +9598,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -9187,16 +9607,17 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 7800301 - Encode failed. * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - packToFile(picture: Picture, fd: number, options: PackingOption): Promise + packToFile(picture: Picture, fd: int, options: PackingOption): Promise /** * Supported image formats. @@ -9213,7 +9634,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; } @@ -9223,7 +9645,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the component buffer. * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getComponent(componentType: ComponentType, callback: AsyncCallback): void; @@ -9281,7 +9709,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the component buffer. * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getComponent(componentType: ComponentType): Promise; @@ -9290,7 +9719,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -9299,7 +9729,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -9309,7 +9740,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the surface id. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getReceivingSurfaceId(callback: AsyncCallback): void; @@ -9358,7 +9794,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the surface id. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getReceivingSurfaceId(): Promise; @@ -9367,7 +9804,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the latest image. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readLatestImage(callback: AsyncCallback): void; @@ -9376,7 +9814,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the latest image. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readLatestImage(): Promise; @@ -9404,7 +9843,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return image. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'imageArrival', callback: AsyncCallback): void; @@ -9414,7 +9854,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to be removed. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'imageArrival', callback?: AsyncCallback): void; @@ -9423,7 +9864,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -9432,7 +9874,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -9442,18 +9885,20 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageCreator * @since 9 */ - queueImage(interface: Image, callback: AsyncCallback): void; + queueImage(image: Image, callback: AsyncCallback): void; /** * Queue buffer to dirty queue and uses a promise to return the result. * - * @param { Image } interface + * @param { Image } image * @returns { Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageCreator * @since 9 */ - queueImage(interface: Image): Promise; + queueImage(image: Image): Promise; /** * Subscribe callback when releasing buffer @@ -9528,7 +9974,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -9537,7 +9984,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } diff --git a/api/@ohos.multimedia.media.d.ts b/api/@ohos.multimedia.media.d.ts index dbbc24af82ad0c86cecbbc4815a38ac491f21edd..a49659062e80eb88642476ec8a89a6f2480ad17e 100755 --- a/api/@ohos.multimedia.media.d.ts +++ b/api/@ohos.multimedia.media.d.ts @@ -411,6 +411,20 @@ declare namespace media { */ function reportAVScreenCaptureUserChoice(sessionId: number, choice: string): Promise; + /** + * get Configurations which user can changes from AVScreenCapture server + * + * @param { number } sessionId The AVScreenCapture server session ID. + * @returns { Promise } Returns a configurable configuration item string. + * @throws { BusinessError } 202 Called from Non-System applications. Return by promise. + * @throws { BusinessError } 5400109 - Sessions not exist. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + function getAVScreenCaptureConfigurableParameters(sessionId: number): Promise; + /** * Creates an **AVTranscoder** instance. This API uses a promise to return the result. * @@ -743,9 +757,10 @@ declare namespace media { /** * Sets the network media source URL and configures request headers. * @param { string } url - The URL of the media resource. - * @param { Record } headers - Optional request headers. + * @param { Record } [headers] - Optional request headers. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @since 20 + * @arkts 1.1&1.2 */ setUrlSource(url: string, headers?: Record): void; @@ -1153,6 +1168,15 @@ declare namespace media { * @since 12 */ customInfo?: Record; + + /** + * Tracks info of the media asset. This parameter is read-only in the current version. + * @type { ?Array } + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @since 20 + * @arkts 1.1&1.2 + */ + tracks?: Array; } /** @@ -1376,6 +1400,18 @@ declare namespace media { * @since 11 */ colorFormat?: PixelFormat; + + /** + * Auto flip the thumbnail when video has mirror attribute(Vertical Flip or Horizontal Flip). + * If the value is false, the returned thumbnail will not be flipped. + * + * @type { ?boolean } + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @systemapi + * @since 21 + * @arkts 1.1&1.2 + */ + autoFlip?: boolean; } /** @@ -1650,6 +1686,14 @@ declare namespace media { * @since 12 */ AVERR_AUDIO_INTERRUPTED = 5400107, + /** + * The parameter value means session does not exist + * @syscap SystemCapability.Multimedia.Media.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + AVERR_SESSION_NOT_EXIST = 5400109, /** * The address of server is incorrect, and IO can not find host. * @syscap SystemCapability.Multimedia.Media.Core @@ -1763,6 +1807,15 @@ declare namespace media { * @since 18 */ AVERR_SUPER_RESOLUTION_NOT_ENABLED = 5410004, + + /** + * The parameter value is out of the specified range. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + AVERR_PARAMETER_OUT_OF_RANGE = 5400108, } /** @@ -2974,6 +3027,27 @@ declare namespace media { */ setBitrate(bitrate: number): void; + /** + * Sets the loudness gain of current media. The default gain is 0.0 dB. + * This API can be called only when the AVPlayer is in the prepared, playing, paused completed or stopped state. + * The stream usage of audioRendererInfo must be {@link StreamUsage#STREAM_USAGE_MUSIC}, + * {@link StreamUsage#STREAM_USAGE_MOVIE}, or {@link StreamUsage#STREAM_USAGE_AUDIOBOOK}. + * After this API is called, the loudness gain takes effect immediately. + * @param { double } loudnessGain - Loudness gain to set, expressed in dB. The value is a + * floating int ranging from -90.0 dB to 24.0 dB. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. + * e.g. The function is called in an incorrect state, or the stream usage of audioRendererInfo is not one of + * {@link StreamUsage#STREAM_USAGE_MUSIC}, {@link StreamUsage#STREAM_USAGE_MOVIE} or + * {@link StreamUsage#STREAM_USAGE_AUDIOBOOK}. + * @throws { BusinessError } 5400105 - Service died. + * @throws { BusinessError } 5400108 - Parameter check failed. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVPlayer + * @since 21 + * @arkts 1.1&1.2 + */ + setLoudnessGain(loudnessGain: double): Promise; + /** * Set decryption session to codec module. * @param { drm.MediaKeySession } mediaKeySession - Handle of MediaKeySession to decrypt encrypted media. @@ -3022,13 +3096,12 @@ declare namespace media { */ /** * Register listens for mediaKeySystemInfoUpdate events. - * @param { 'mediaKeySystemInfoUpdate' } type - Event type, which is **'mediaKeySystemInfoUpdate'** in this case. - * This event is triggered when the copyright protection information of the media asset being played changes. - * @param { Callback> } callback - Callback invoked when the event is triggered. - * It reports a **MediaKeySystemInfo** array. + * @param { 'mediaKeySystemInfoUpdate' } type - Type of the event to listen for. + * @param { Callback> } callback - Callback used to listen for the mediaKeySystemInfoUpdate event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'mediaKeySystemInfoUpdate', callback: Callback>): void; @@ -3303,7 +3376,7 @@ declare namespace media { /** * Unregister listens for media playbackRateDone event. * @param { 'playbackRateDone' } type - Type of the playback event to listen for. - * @param { OnPlaybackRateDone } callback - Callback used to listen for the playbackRateDone event. + * @param { OnPlaybackRateDone } [callback] - Callback used to listen for the playbackRateDone event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice * @since 20 @@ -3688,11 +3761,8 @@ declare namespace media { * @since 12 */ /** - * Subscribes to AVPlayer errors. This event is used only for error prompt and does not require the user to stop - * playback control. If AVPlayerState is also switched to error, call {@link #reset()} or {@link #release()} - * to exit the playback. - * @param { 'error' } type - Event type, which is **'error'** in this case. This event can be triggered by - * both user operations and the system. + * Register listens for playback error events. + * @param { 'error' } type - Type of the playback error event to listen for. * @param { ErrorCallback } callback - Callback used to listen for the playback error event. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. @@ -3718,6 +3788,36 @@ declare namespace media { * @atomicservice * @since 14 */ + /** + * Register listens for playback error events. + * @param { 'error' } type - Type of the playback error event to listen for. + * @param { ErrorCallback } callback - Callback used to listen for the playback error event. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - The parameter check failed. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 5400101 - No memory. + * @throws { BusinessError } 5400102 - Operation not allowed. + * @throws { BusinessError } 5400104 - Time out. + * @throws { BusinessError } 5400105 - Service died. + * @throws { BusinessError } 5400106 - Unsupported format. + * @throws { BusinessError } 5410002 - Seek continuous unsupported. + * @throws { BusinessError } 5411001 - IO can not find host. + * @throws { BusinessError } 5411002 - IO connection timeout. + * @throws { BusinessError } 5411003 - IO network abnormal. + * @throws { BusinessError } 5411004 - IO network unavailable. + * @throws { BusinessError } 5411005 - IO no permission. + * @throws { BusinessError } 5411006 - IO request denied. + * @throws { BusinessError } 5411007 - IO resource not found. + * @throws { BusinessError } 5411008 - IO SSL client cert needed. + * @throws { BusinessError } 5411009 - IO SSL connect fail. + * @throws { BusinessError } 5411010 - IO SSL server cert untrusted. + * @throws { BusinessError } 5411011 - IO unsupported request. + * @syscap SystemCapability.Multimedia.Media.AVPlayer + * @crossplatform + * @atomicservice + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ on(type: 'error', callback: ErrorCallback): void; /** * Unregister listens for playback error events. @@ -3935,7 +4035,7 @@ declare namespace media { * Unsubscribes from the event indicating that super resolution is enabled or disabled. * @param { 'superResolutionChanged' } type - Type of the super-resolution event to listen for. * The event is triggered when super resolution is enabled or disabled. - * @param { OnSuperResolutionChanged } callback - Callback used to listen for the super-resolution changed event. + * @param { OnSuperResolutionChanged } [callback] - Callback used to listen for the super-resolution changed event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice * @since 18 @@ -4610,6 +4710,18 @@ declare namespace media { * @since 20 */ keepDecodingOnMute?: boolean; + + /** + * Indicates whether to enable camera post-processing during video playback, + * which is used to apply image enhancements when playing back video content. + * @type { ?boolean } The default value is false, which means that the video + * will be played back without any camera post-processing effects. + * @syscap SystemCapability.Multimedia.Media.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + enableCameraPostprocessing?: boolean; } /** @@ -5146,7 +5258,6 @@ declare namespace media { * **err** is **undefined**; otherwise, **err** is an error object. * @throws { BusinessError } 201 - Permission denied. Return by callback. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameter types. 3.Parameter verification failed. *
2. Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 5400102 - Operate not permit. Return by callback. * @throws { BusinessError } 5400105 - Service died. Return by callback. @@ -5202,8 +5313,8 @@ declare namespace media { */ /** * Sets audio and video recording parameters. This API uses a promise to return the result. - * @permission ohos.permission.MICROPHONE * This permission is required only if audio recording is involved. + * @permission ohos.permission.MICROPHONE * @param { AVRecorderConfig } config - Recording parameters. * @returns { Promise } A Promise instance used to return when prepare completed. * @throws { BusinessError } 201 - Permission denied. Return by promise. @@ -6251,6 +6362,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.CodecMimeType#AUDIO_AMR_NB */ AMR_NB = 1, @@ -6259,6 +6371,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.CodecMimeType#AUDIO_AMR_WB */ AMR_WB = 2, @@ -6267,6 +6380,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.CodecMimeType#AUDIO_AAC */ AAC_LC = 3, @@ -6275,6 +6389,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.CodecMimeType#AUDIO_AAC */ HE_AAC = 4 } @@ -6302,6 +6417,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.ContainerFormatType#CFT_MPEG_4 */ MPEG_4 = 2, @@ -6310,6 +6426,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.ContainerFormatType#CFT_AMR */ AMR_NB = 3, @@ -6318,6 +6435,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.ContainerFormatType#CFT_AMR */ AMR_WB = 4, @@ -6326,6 +6444,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 8 + * @useinstead ohos.multimedia.media/media.ContainerFormatType#CFT_AAC */ AAC_ADTS = 6 } @@ -6428,6 +6547,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderProfile#audioBitrate */ audioEncodeBitRate?: number; @@ -6437,6 +6557,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderProfile#audioSampleRate */ audioSampleRate?: number; @@ -6446,6 +6567,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderProfile#audioChannels */ numberOfChannels?: number; @@ -6469,6 +6591,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderConfig#url */ uri: string; @@ -6478,6 +6601,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 6 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVMetadata#location */ location?: Location; @@ -6487,6 +6611,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 8 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderProfile#audioCodec */ audioEncoderMime?: CodecMimeType; /** @@ -6495,6 +6620,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AudioRecorder * @since 8 * @deprecated since 9 + * @useinstead ohos.multimedia.media/media.AVRecorderProfile#fileFormat */ fileFormat?: ContainerFormatType; } @@ -7728,6 +7854,14 @@ declare namespace media { * @since 12 */ enum MediaType { + /** + * Track is unsupported. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + MEDIA_TYPE_UNSUPPORTED = -1, /** * track is audio. * @syscap SystemCapability.Multimedia.Media.Core @@ -7773,6 +7907,38 @@ declare namespace media { * @since 12 */ MEDIA_TYPE_SUBTITLE = 2, + /** + * Track is attachmemt. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + MEDIA_TYPE_ATTACHMENT = 3, + /** + * Track is data. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + MEDIA_TYPE_DATA = 4, + /** + * Track is timed metadata. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + MEDIA_TYPE_TIMED_METADATA = 5, + /** + * Track is auxiliary. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + MEDIA_TYPE_AUXILIARY = 6, } /** @@ -8031,6 +8197,24 @@ declare namespace media { * @since 12 */ MD_KEY_HDR_TYPE = 'hdr_type', + + /** + * Key for video original width, value type is number. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + MD_KEY_ORIGINAL_WIDTH = 'original_width', + + /** + * Key for video original height, value type is number. + * @syscap SystemCapability.Multimedia.Media.Core + * @atomicservice + * @since 21 + * @arkts 1.1&1.2 + */ + MD_KEY_ORIGINAL_HEIGHT = 'original_height', } /** @@ -9661,6 +9845,14 @@ declare namespace media { * @since 12 */ videoFrameHeight?: number; + + /** + * Indicates whether to enable B Frame Encoding for reduce file size. + * @type { ?boolean } The default value is false, which means B frame encoding cannot be enabled. + * @syscap SystemCapability.Multimedia.Media.AVTranscoder + * @since 20 + */ + enableBFrame?: boolean; } /** diff --git a/api/@ohos.multimedia.movingphotoview.d.ts b/api/@ohos.multimedia.movingphotoview.d.ts index 44055a162b614aea10094a115b66231f2c134a32..6b9b42d5a3f5d90d2a3aded108aa2a4d249b95aa 100644 --- a/api/@ohos.multimedia.movingphotoview.d.ts +++ b/api/@ohos.multimedia.movingphotoview.d.ts @@ -20,102 +20,6 @@ import photoAccessHelper from './@ohos.file.photoAccessHelper'; -/** - * Enumerates pixel map formats. - * - * @enum { number } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ -export declare enum PixelMapFormat { - /** - * Indicates an unknown format. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - UNKNOWN = 0, - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components:B(8bits), G(8bits), R(8bits), A(8bits) - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - RGBA_8888 = 1, - /** - * Indicates that the storage order is to store Y first and then V U alternately each occupies 8 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - NV21 = 2, - /** - * Indicates that each pixel is stored on 32 bits. Each pixel contains 4 components: - * R(10bits), G(10bits), B(10bits), A(2bits) and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 14 - */ - RGBA_1010102 = 3, - - /** - * Indicates that the storage order is to store Y first and then U V alternately each occupies 10 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 14 - */ - YCBCR_P010 = 4, - - /** - * Indicates that the storage order is to store Y first and then V U alternately each occupies 10 bits - * and are stored from the higher-order to the lower-order bits. - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 14 - */ - YCRCB_P010 = 5 -} -/** - * Dynamic range mode of moving photo. - * - * @enum { number } - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ -export declare enum DynamicRangeMode { - /** - * Allow image content to use an unrestricted extended range - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - HIGH = 0, - /** - * Allow image content to use some extended range - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - CONSTRAINT = 1, - /** - * Restrict the image content to dynamic range to the standard range - * - * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @systemapi - * @since 14 - */ - STANDARD = 2, -} /** * Defines the moving photo view options. * @@ -123,7 +27,8 @@ export declare enum DynamicRangeMode { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare interface MovingPhotoViewOptions { /** @@ -133,7 +38,8 @@ declare interface MovingPhotoViewOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ movingPhoto: photoAccessHelper.MovingPhoto; /** @@ -143,7 +49,8 @@ declare interface MovingPhotoViewOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ controller?: MovingPhotoViewController; /** @@ -153,16 +60,19 @@ declare interface MovingPhotoViewOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ imageAIOptions?: ImageAIOptions; + /** * format of MovingPhotoView. * * @type { ?PixelMapFormat } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts{ '1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ movingPhotoFormat?: PixelMapFormat; /** @@ -171,7 +81,8 @@ declare interface MovingPhotoViewOptions { * @type { ?DynamicRangeMode } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts{ '1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ dynamicRangeMode?: DynamicRangeMode; /** @@ -180,7 +91,8 @@ declare interface MovingPhotoViewOptions { * @type { ?boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 19 + * @since arkts{ '1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ playWithMask?: boolean; } @@ -191,7 +103,8 @@ declare interface MovingPhotoViewOptions { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MovingPhotoViewInterface { /** @@ -202,7 +115,8 @@ interface MovingPhotoViewInterface { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ (options: MovingPhotoViewOptions): MovingPhotoViewAttribute; } @@ -214,7 +128,8 @@ interface MovingPhotoViewInterface { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare type MovingPhotoViewEventCallback = () => void; @@ -225,7 +140,8 @@ declare type MovingPhotoViewEventCallback = () => void; * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare class MovingPhotoViewAttribute extends CommonMethod { /** @@ -236,7 +152,8 @@ declare class MovingPhotoViewAttribute extends CommonMethod): void; } -export default motion; \ No newline at end of file +export default motion; diff --git a/api/@ohos.multimodalAwareness.onScreen.d.ts b/api/@ohos.multimodalAwareness.onScreen.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2df36ae05d8180dc55a462ea1bc39154dfd700c --- /dev/null +++ b/api/@ohos.multimodalAwareness.onScreen.d.ts @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit MultimodalAwarenessKit + */ + +import { BusinessError } from './@ohos.base'; + +/** + * This module provides the capability to use on screen awareness + * + * @namespace onScreen + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @since 20 + */ + +declare namespace onScreen { + /** + * Enum for page content scenario + * + * @enum { number } Scenario + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @since 20 + */ + export enum Scenario { + /** + * Indicates unknown scenario + * + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + UNKNOWN = 0, + /** + * Indicates article scenario + * + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + ARTICLE = 1, + } + + /** + * Enum for control event type + * + * @enum { number } EventType + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @since 20 + */ + export enum EventType { + /** + * Indicates scroll to hook event type + * + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + SCROLL_TO_HOOK = 1, + } + + /** + * Interface for paragraph + * @interface Paragraph + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + export interface Paragraph { + /** + * Indicates paragraph hook id + * @type { ?number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + hookId?: number, + /** + * Indicates paragraph chapter id if paragraph is splited to chapters + * @type { ?number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + chapterId?: number, + /** + * Indicates paragraph title + * @type { ?string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + title?: string, + /** + * Indicates paragraph text + * @type { ?string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + text?: string + } + + /** + * Interface for content options + * @interface ContentOptions + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + export interface ContentOptions { + /** + * Indicates the windowId which need to gather, full screen window is specified by default + * @type { ?number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + windowId?: number, + /** + * Indicates whether content understanding is required, false by default + * @type { ?boolean } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + contentUnderstand?: boolean, + /** + * Indicates whether page link is required, false by default + * @type { ?boolean } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + pageLink?: boolean, + /** + * Indicates whether only text needs to be processed to return paragraphs, false by default + * @type { ?boolean } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + textOnly?: boolean, + } + + /** + * Interface for pageContent + * @interface PageContent + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + export interface PageContent { + /** + * Indicates window id corresponding to the content + * @type { number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + windowId: number, + /** + * Indicates session id corresponding to the content + * @type { number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + sessionId: number, + /** + * Indicates bundle name corresponding to the content + * @type { string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + bundleName: string, + /** + * Indicates scenario of the content + * @type { ?Scenario } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + scenario?: Scenario, + /** + * Indicates title if content understand is needed + * @type { ?string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + title?: string, + /** + * Indicates content if content understand is needed + * @type { ?string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + content?: string, + /** + * Indicates page link if page link is needed + * @type { ?string } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + pageLink?: string, + /** + * Indicates paragraphs if text only is needed + * @type { ?Paragraph[] } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + paragraphs?: Paragraph[], + } + + /** + * Interface for control event + * @interface ControlEvent + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + export interface ControlEvent { + /** + * Indicates controlled window id + * @type { number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + windowId: number, + /** + * Indicates session id + * @type { number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + sessionId: number, + /** + * Indicates control event type + * @type { EventType } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + eventType: EventType, + /** + * Indicates controlled hookid for specific event type and specific session id + * @type { ?number } + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + hookId?: number, + } + + /** + * Get page content + * + * @permission ohos.permission.GET_SCREEN_CONTENT + * @param { ContentOptions } [options] - Indicates options to get page content + * @returns { Promise } Indicates the promise which carrys retrieved page content + * @throws { BusinessError } 201 - Permission denied. An attempt was made to get page content forbidden by + *
permission: ohos.permission.GET_SCREEN_CONTENT. + * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API. + * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited + *
device capabilities. + * @throws { BusinessError } 34000001 - Service exception. + * @throws { BusinessError } 34000002 - The application or page is not supported. + * @throws { BusinessError } 34000003 - The window ID is invalid. Possible causes: 1. window id is not passed + *
when screen is splited. 2. passed window id is not on screen or floating. + * @throws { BusinessError } 34000004 - The page is not ready. + * @throws { BusinessError } 34000006 - The request timed out. + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + function getPageContent(options?: ContentOptions): Promise; + + /** + * Send control event + * + * @permission ohos.permission.SIMULATE_USER_INPUT + * @param { ControlEvent } event - Indicates the control event sent to the screen + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. An attempt was made to get page content forbidden by + *
permission: ohos.permission.SIMULATE_USER_INPUT. + * @throws { BusinessError } 202 - Permission check failed. A non-system application uses the system API. + * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited + *
device capabilities. + * @throws { BusinessError } 34000001 - Service exception. + * @throws { BusinessError } 34000005 - The target is not found. + * @syscap SystemCapability.MultimodalAwareness.OnScreenAwareness + * @systemapi + * @since 20 + */ + function sendControlEvent(event: ControlEvent): Promise; +} +export default onScreen; \ No newline at end of file diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index 150b64d5026bf97d90fb31517052a95515462f8f..48b3923f9a3423c64c1ea72392468196410be29a 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -95,6 +95,17 @@ declare namespace inputEventClient { * @since 11 */ mouseEvent: MouseEvent; + + /** + * Whether to use global coordinate to calculate injected mouse event. + * + * @type { ?boolean } + * @syscap SystemCapability.MultimodalInput.Input.InputSimulator + * @systemapi hide for inner use + * @since 20 + * @arkts 1.1&1.2 + */ + useGlobalCoordinate? : boolean; } /** @@ -115,6 +126,17 @@ declare namespace inputEventClient { * @since 11 */ touchEvent: TouchEvent; + + /** + * Whether to use global coordinate to calculate injected touch event. + * + * @type { ?boolean } + * @syscap SystemCapability.MultimodalInput.Input.InputSimulator + * @systemapi hide for inner use + * @since 20 + * @arkts 1.1&1.2 + */ + useGlobalCoordinate?: boolean; } /** @@ -256,4 +278,4 @@ declare namespace inputEventClient { function permitInjection(result: boolean): void; } -export default inputEventClient; +export default inputEventClient; \ No newline at end of file diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index d60713c3dc9e7fcb2bf859b5111745c5d53207b1..e8f9c69764c3d6ab389dc98bd8cdf2b19bacfaae 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -599,8 +599,7 @@ declare namespace inputMonitor { * @returns { Promise> } Returns the result through a promise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 3800001 - System internal error. - * @syscap SystemCapability.MultimodalInput.Input.Core + * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @since 20 */ diff --git a/api/@ohos.multimodalInput.intentionCode.d.ts b/api/@ohos.multimodalInput.intentionCode.d.ts index ee127fa5db0eb42d848113e48c0b91c0d5c85f5c..cb47f8ec168b9e84926fc4ca5d3932a698eaebde 100644 --- a/api/@ohos.multimodalInput.intentionCode.d.ts +++ b/api/@ohos.multimodalInput.intentionCode.d.ts @@ -23,8 +23,7 @@ * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * IntentionCode @@ -40,8 +39,7 @@ export declare enum IntentionCode { * INTENTION_UNKNOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_UNKNOWN @@ -57,8 +55,7 @@ export declare enum IntentionCode { * INTENTION_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_UP @@ -74,8 +71,7 @@ export declare enum IntentionCode { * INTENTION_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_DOWN @@ -91,8 +87,7 @@ export declare enum IntentionCode { * INTENTION_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_LEFT @@ -108,8 +103,7 @@ export declare enum IntentionCode { * INTENTION_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_RIGHT @@ -125,8 +119,7 @@ export declare enum IntentionCode { * INTENTION_SELECT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_SELECT @@ -142,8 +135,7 @@ export declare enum IntentionCode { * INTENTION_ESCAPE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_ESCAPE @@ -159,8 +151,7 @@ export declare enum IntentionCode { * INTENTION_BACK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_BACK @@ -176,8 +167,7 @@ export declare enum IntentionCode { * INTENTION_FORWARD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_FORWARD @@ -193,8 +183,7 @@ export declare enum IntentionCode { * INTENTION_MENU * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_MENU @@ -210,8 +199,7 @@ export declare enum IntentionCode { * INTENTION_PAGE_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_PAGE_UP @@ -227,8 +215,7 @@ export declare enum IntentionCode { * INTENTION_PAGE_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_PAGE_DOWN @@ -244,8 +231,7 @@ export declare enum IntentionCode { * INTENTION_ZOOM_OUT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_ZOOM_OUT @@ -261,8 +247,7 @@ export declare enum IntentionCode { * INTENTION_ZOOM_IN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * INTENTION_ZOOM_IN diff --git a/api/@ohos.multimodalInput.keyCode.d.ts b/api/@ohos.multimodalInput.keyCode.d.ts index 8c5e443fc2b79ef172fe8b158d02a7b8aa2b8d6e..1c6810538e78e7c4ed4d8f5836b57f61580c8d0d 100644 --- a/api/@ohos.multimodalInput.keyCode.d.ts +++ b/api/@ohos.multimodalInput.keyCode.d.ts @@ -66,14 +66,6 @@ export declare enum KeyCode { */ KEYCODE_BACK = 2, - /** - * KEYCODE_HEADSETHOOK - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - KEYCODE_HEADSETHOOK = 6, - /** * KEYCODE_SEARCH * diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index 29c7d1936b505ea2a22aa3ee714a09856013d292..827bbc5f60055d37d0193397612d51223833a53a 100644 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -444,4 +444,22 @@ export declare interface MouseEvent extends InputEvent { * @since 11 */ toolType: ToolType; + + /** + * globalX - Global X coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ + globalX?: number; + + /** + * globalY - Global Y coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ + globalY?: number; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 0491653da2e40fb95007ea90c2c4c448acb5600d..9a5281d537a73d626470ad59c3b6e2ddb63a4f69 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -444,15 +444,14 @@ declare namespace pointer { * Loading state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * Loading state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ LOADING, @@ -461,15 +460,14 @@ declare namespace pointer { * Running state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ /** * Running state with dynamic cursor * * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ RUNNING, @@ -481,7 +479,16 @@ declare namespace pointer { * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - MIDDLE_BTN_EAST_WEST + MIDDLE_BTN_EAST_WEST, + + /** + * Screen recorder cursor + * + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @since 20 + * @arkts 1.1&1.2 + */ + SCREENRECORDER_CURSOR = 48 } /** diff --git a/api/@ohos.multimodalInput.touchEvent.d.ts b/api/@ohos.multimodalInput.touchEvent.d.ts index a7a66aeccb0b67f7c714e75706082f9e0d3ef8b1..5ce38f70696845ac5fabbe9437344f575acbe8c8 100644 --- a/api/@ohos.multimodalInput.touchEvent.d.ts +++ b/api/@ohos.multimodalInput.touchEvent.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -364,6 +364,24 @@ export declare interface Touch { * @since 19 */ fixedDisplayY?: number; + + /** + * globalX - Global X coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ + globalX?: number; + + /** + * globalY - Global Y coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ + globalY?: number; } /** diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index 283b93bbd900f3c374b2261b2443aade1de792ce..42a579bf00c06c075ca6226cbe715d380f177620 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -79,7 +79,6 @@ declare namespace connection { * @typedef { socket.TCPSocket } * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @atomicservice * @since 10 */ type TCPSocket = socket.TCPSocket; @@ -94,7 +93,6 @@ declare namespace connection { * @typedef { socket.UDPSocket } * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @atomicservice * @since 10 */ type UDPSocket = socket.UDPSocket; @@ -398,7 +396,7 @@ declare namespace connection { * Set the network extended attribute for a {@link NetHandle} object. * To invoke this method, you must have the {@code ohos.permission.SET_NET_EXT_ATTRIBUTE} permission. * @permission ohos.permission.SET_NET_EXT_ATTRIBUTE - * @param { NetHandle } netHandle - Indicates the network to be queried. See {@link NetHandle}. + * @param { NetHandle } netHandle - Indicates the network to be set. See {@link NetHandle}. * @param { string } netExtAttribute - Indicates the extended attribute of the network. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -414,7 +412,7 @@ declare namespace connection { * Set the network extended attribute for a {@link NetHandle} object. * To invoke this method, you must have the {@code ohos.permission.SET_NET_EXT_ATTRIBUTE} permission. * @permission ohos.permission.SET_NET_EXT_ATTRIBUTE - * @param { NetHandle } netHandle - Indicates the network to be queried. See {@link NetHandle}. + * @param { NetHandle } netHandle - Indicates the network to be set. See {@link NetHandle}. * @param { string } netExtAttribute - Indicates the extended attribute of the network. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2100001 - Invalid parameter value. @@ -899,6 +897,62 @@ declare namespace connection { */ function getPacUrl(): string; + /** + * Set the URL {@link pacFileUrl} of the current PAC script. + * Proxy information can be obtained through parsing the script address. + * To invoke this method, you must have the {@code ohos.permission.SET_PAC_URL} permission. + * @permission ohos.permission.SET_PAC_URL + * @param { string } pacFileUrl - Indicates the URL of the current PAC script. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 2100002 - Failed to connect to the service. + * @syscap SystemCapability.Communication.NetManager.Core + * @since 20 + */ + function setPacFileUrl(pacFileUrl: string): void; + + /** + * Obtain the URL {@link pacFileUrl} of the current PAC script. + * @returns { string } Returns the URL of the current PAC script or empty string if there is no PAC script. + * @throws { BusinessError } 2100002 - Failed to connect to the service. + * @syscap SystemCapability.Communication.NetManager.Core + * @since 20 + */ + function getPacFileUrl(): string; + + /** + * Find pac proxy info for the url. + * @param { string } url - the url. + * @returns { string } Returns the proxy infomation. + * @syscap SystemCapability.Communication.NetManager.Core + * @since 20 + */ + function findProxyForUrl(url: string): string; + + /** + * Set the proxy mode {@link ProxyMode}. + * @permission ohos.permission.CONNECTIVITY_INTERNAL + * @param { ProxyMode } mode - Indicates the proxy mode. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications use system APIs. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. Only used for system app. + * @since 20 + */ + function setProxyMode(mode: ProxyMode): Promise; + + /** + * Obtain the proxy mode {@link ProxyMode}. + * @permission ohos.permission.CONNECTIVITY_INTERNAL + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications use system APIs. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. Only used for system app. + * @since 20 + */ + function getProxyMode(): Promise; + /** * Add a custom {@link host} and corresponding {@link ip} mapping for current application. * @permission ohos.permission.INTERNET @@ -1887,6 +1941,31 @@ declare namespace connection { BEARER_VPN = 4, } + /** + * Enumerates proxy modes. + * @enum {number} + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. Only used for system app. + * @since 20 + */ + export enum ProxyMode{ + /** + * Off proxy mode. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. Only used for system app. + * @since 20 + */ + PROXY_MODE_OFF = 0, + + /** + * Auto proxy mode. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. Only used for system app. + * @since 20 + */ + PROXY_MODE_AUTO = 1 + } + /** * Defines the network connection properties. * @interface ConnectionProperties @@ -1987,6 +2066,14 @@ declare namespace connection { * @since 8 */ isDefaultRoute: boolean; + + /** + * Whether the route is the excluded route. + * @type { ?boolean} + * @syscap SystemCapability.Communication.NetManager.Core + * @since 20 + */ + isExcludedRoute?: boolean; } /** diff --git a/api/@ohos.net.eap.d.ts b/api/@ohos.net.eap.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c07b92dff9c9f7b791de708cbb2173a75aa17097 --- /dev/null +++ b/api/@ohos.net.eap.d.ts @@ -0,0 +1,527 @@ +/* + * Copyright (C) 2025-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit NetworkKit + */ + +import { Callback } from './@ohos.base'; +/** + * Provides interfaces to manage ethernet. + * @namespace eap + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ +declare namespace eap { + /** + * Customize eap packets by callback + * @permission ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION + * @param { number } netType Indicates net type need to customize. + * @param { number } eapCode Indicates eap code need to customize. + * @param { number } eapType Indicates eap type need to customize. + * @param { Callback } callback - the callback of eap packet customization. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 33200006 - Invalid net type + * @throws { BusinessError } 33200007 - Invalid eap code + * @throws { BusinessError } 33200008 - Invalid eap type + * @throws { BusinessError } 33200009 - netmanager stop + * @throws { BusinessError } 33200099 - internal error + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + function regCustomEapHandler(netType: number, eapCode: number, eapType: number, callback: Callback): void; + + /** + * unreg the callback of eap packet customization. + * @permission ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION + * @param { number } netType Indicates net type need to customize. + * @param { number } eapCode Indicates eap code need to customize. + * @param { number } eapType Indicates eap type need to customize. + * @param { Callback } callback - the callback of eap packet customization. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 33200006 - Invalid net type + * @throws { BusinessError } 33200007 - Invalid eap code + * @throws { BusinessError } 33200008 - Invalid eap type + * @throws { BusinessError } 33200009 - netmanager stop + * @throws { BusinessError } 33200099 - internal error + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + function unregCustomEapHandler(netType:number, eapCode: number, eapType: number, callback: Callback): void; + + /** + * send Customized eap packets to system + * @permission ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION + * @param { CustomResult } result Indicates the result of custom authentication. + * @param { EapData } data Indicates eap packet data after customization. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 33200004 - Invalid result + * @throws { BusinessError } 33200005 - Invalid size of eap data + * @throws { BusinessError } 33200009 - netmanager stop + * @throws { BusinessError } 33200099 - internal error + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + function replyCustomEapData(result: CustomResult, data: EapData): void; + + /** + * Set the specified network interface parameters. + * @permission ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION + * @param { number } netId Indicates the eth network id to start EAP authentication. + * @param { EthEapProfile } profile Indicates the eap profile. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 33200001 - Invalid netId + * @throws { BusinessError } 33200003 - Invalid profile + * @throws { BusinessError } 33200009 - netmanager stop + * @throws { BusinessError } 33200010 - invalid eth state + * @throws { BusinessError } 33200099 - internal error + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + function startEthEap(netId: number, profile: EthEapProfile): void; + + /** + * Check whether the specified network is active. + * @permission ohos.permission.MANAGE_ENTERPRISE_WIFI_CONNECTION + * @param { number } netId Indicates the eth network id to log off EAP authentication. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 33200001 - Invalid netId + * @throws { BusinessError } 33200002 - Log off fail + * @throws { BusinessError } 33200009 - netmanager stop + * @throws { BusinessError } 33200010 - invalid eth state + * @throws { BusinessError } 33200099 - internal error + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + function logOffEthEap(netId: number): void; + + /** + * Describes the EAP information. + * + * @typedef EapData + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + interface EapData { + /** + * EAP message ID. + * + * @type { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + msgId: number; + /** + * EAP packet buffer. + * + * @type { Uint8Array } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + eapBuffer: Uint8Array; + /** + * EAP packet length. + * + * @type { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + bufferLen: number; + } + + /** + * custom 802.1x result. + * + * @enum { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + enum CustomResult { + /** + * custom authentication finished and fail + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + RESULT_FAIL, + + /** + * custom authentication success for current step, go to next step + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + RESULT_NEXT, + + /** + * custom authentication finished and success + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + RESULT_FINISH, + } + +/** + * 802.1x EAP method. + * + * @enum { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + enum EapMethod { + /** + * Not specified + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_NONE, + + /** + * Protected extensible authentication protocol + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_PEAP, + + /** + * Transport layer security + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_TLS, + + /** + * Tunneled transport layer security + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_TTLS, + + /** + * Password + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_PWD, + + /** + * Subscriber identity module + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_SIM, + + /** + * Authentication and key agreement + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_AKA, + + /** + * AKA prime + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_AKA_PRIME, + + /** + * Unauth TLS + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + EAP_UNAUTH_TLS + } + + /** + * 802.1x phase 2 method. + * + * @enum { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + enum Phase2Method { + /** + * Not specified + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_NONE, + + /** + * Password authentication protocol + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_PAP, + + /** + * Microsoft challenge handshake authentication protocol + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_MSCHAP, + + /** + * Microsoft challenge handshake authentication protocol version 2 + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_MSCHAPV2, + + /** + * Generic token card + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_GTC, + + /** + * Subscriber identity module + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_SIM, + + /** + * Authentication and key agreement + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_AKA, + + /** + * AKA Prime + * + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + PHASE2_AKA_PRIME + } + + /** + * Eth EAP profile. + * + * @typedef EthEapProfile + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + interface EthEapProfile { + /** + * EAP authentication method + * + * @type { EapMethod } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + eapMethod: EapMethod; + + /** + * Phase 2 authentication method + * + * @type { Phase2Method } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + phase2Method: Phase2Method; + + /** + * The identity + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + identity: string; + + /** + * Anonymous identity + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + anonymousIdentity: string; + + /** + * Password + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + password: string; + + /** + * CA certificate alias + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + caCertAliases: string; + + /** + * CA certificate path + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + caPath: string; + + /** + * Client certificate alias + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + clientCertAliases: string; + + /** + * content of user's certificate + * + * @type { Uint8Array } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + certEntry: Uint8Array; + + /** + * Password of user's certificate + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + certPassword: string; + + /** + * Alternate subject match + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + altSubjectMatch: string; + + /** + * Domain suffix match + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + domainSuffixMatch: string; + + /** + * Realm for Passpoint credential + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + realm: string; + + /** + * Public Land Mobile Network of the provider of Passpoint credential + * + * @type { string } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + plmn: string; + + /** + * Sub ID of the SIM card + * + * @type { number } + * @syscap SystemCapability.Communication.NetManager.Eap + * @since 20 + * @arkts 1.1&1.2 + */ + eapSubId: number; + } + +} + +export default eap; \ No newline at end of file diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index c6f57786217bf276d0c31eddb5667e440cd3e325..daadc06fed6acd687e4082f6d4230c78fcb6e45c 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -397,6 +397,39 @@ declare namespace http { */ caPath?: string; + /** + * A PEM representation of a certificate. The system will create an X.509 certificate object in the SSL process. + * If the caPath option is set, the caData option will be ignored. + * Certificate chain is not supported. + * Maxium length is 8000 Bytes. + * @type { ?string } + * @syscap SystemCapability.Communication.NetStack + * @crossplatform + * @atomicservice + * @since 20 + */ + caData?: string; + + /** + * Which secure communication protocol is used, TLS (by defaul) or TLCP. + * If TLCP is used, all TLS related options, such as caPath, caData and clientCert, are ignored. + * @type { ?SslType } + * @syscap SystemCapability.Communication.NetStack + * @atomicservice + * @since 20 + */ + sslType?: SslType; + + /** + * Support the application to pass in client certificates, allowing the server to verify the + * client's encryption identity. + * @type { ?ClientCert } + * @syscap SystemCapability.Communication.NetStack + * @atomicservice + * @since 20 + */ + clientEncCert?: ClientCert; + /** * Used to set to uploading or downloading the start bytes. The default value is 0. * HTTP standard (RFC 7233 section 3.1) allows servers to ignore range requests. @@ -624,6 +657,15 @@ declare namespace http { */ export type AuthenticationType = 'basic' | 'ntlm' | 'digest'; + /** + * The secure communication protocol. + * @typedef { 'TLS' | 'TLCP'} + * @syscap SystemCapability.Communication.NetStack + * @atomicservice + * @since 20 + */ + export type SslType = 'TLS' | 'TLCP'; + /** * HTTP credential. Some server or proxy server need this. * @typedef Credential diff --git a/api/@ohos.net.socket.d.ts b/api/@ohos.net.socket.d.ts index df3a30f8105e8e653ebd84b7caabe6055f659623..d92cfcfd02bf4c383cac579007fd5f4335bef00a 100644 --- a/api/@ohos.net.socket.d.ts +++ b/api/@ohos.net.socket.d.ts @@ -2037,6 +2037,15 @@ declare namespace socket { */ getLocalAddress(): Promise; + /** + * Close the LocalSocketServer. Close the LocalSocketServer listening port. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 2300002 - System internal error. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + close(): Promise; + /** * Listens for connect events of the LocalSocketServer connection. * @param { 'connect' } type - Indicates Event name. @@ -4167,6 +4176,17 @@ declare namespace socket { */ listen(address: NetAddress): Promise; + /** + * Close the TCPSocketServer. Close the TCPSocketServer listening port. + * @permission ohos.permission.INTERNET + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 2300002 - System internal error. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + close(): Promise; + /** * Obtains the status of the TCPSocketServer connection. * @permission ohos.permission.INTERNET @@ -4651,6 +4671,17 @@ declare namespace socket { */ listen(options: TLSConnectOptions): Promise; + /** + * Close the TLSSocketServer. Close the TLSSocketServer listening port. + * @permission ohos.permission.INTERNET + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 2300002 - System internal error. + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + close(): Promise; + /** * Obtains the status of the TLSSocketServer connection. * @param { AsyncCallback } callback - The callback of getState. diff --git a/api/@ohos.net.vpn.d.ts b/api/@ohos.net.vpn.d.ts index 13af99c3c853897e23b62c94c0fe4fcfa44e6578..288c077e4b06d30669fafc6b9d243ea87b48c9fe 100644 --- a/api/@ohos.net.vpn.d.ts +++ b/api/@ohos.net.vpn.d.ts @@ -82,6 +82,21 @@ declare namespace vpn { */ function on(type: 'connect', callback: Callback): void; + /** + * Subscribes to vpn connect state changes. + * @permission ohos.permission.MANAGE_VPN + * @param { 'connectMulti' } type - Indicates multi vpn connect state changes. + * @param { Callback } callback - The callback of the multi vpn connect state. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications use system APIs. + * @throws { BusinessError } 19900001 - Invalid parameter value. + * @throws { BusinessError } 19900002 - System internal error. + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + function on(type: 'connectMulti', callback: Callback): void; + /** * Unsubscribes from vpn connect state changes. * @permission ohos.permission.MANAGE_VPN @@ -99,6 +114,21 @@ declare namespace vpn { */ function off(type: 'connect', callback?: Callback): void; + /** + * Unsubscribes from vpn connect state changes. + * @permission ohos.permission.MANAGE_VPN + * @param { 'connectMulti' } type - Indicates multi vpn connect state changes. + * @param { Callback } [callback] - The callback of the multi vpn connect state. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications use system APIs. + * @throws { BusinessError } 19900001 - Invalid parameter value. + * @throws { BusinessError } 19900002 - System internal error. + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + function off(type: 'connectMulti', callback?: Callback): void; + /** * Add a system VPN network configuration. * @permission ohos.permission.MANAGE_VPN @@ -178,6 +208,20 @@ declare namespace vpn { */ function getConnectedSysVpnConfig(): Promise; + /** + * Get the connected VPN App Info. + * @permission ohos.permission.MANAGE_VPN + * @returns { Promise> } The promise returned by the connected VPN App Info. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Non-system applications use system APIs. + * @throws { BusinessError } 19900001 - Invalid parameter value. + * @throws { BusinessError } 19900002 - System internal error. + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + function getConnectedVpnAppInfo(): Promise>; + /** * Defines a VPN connection. * @interface VpnConnection @@ -301,6 +345,15 @@ declare namespace vpn { * @since 10 */ export interface VpnConfig { + /** + * The uuid for the VPN network. + * @type {?string} + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + vpnId?: string; + /** * The array of addresses for VPN interface. * @type {Array} @@ -482,6 +535,33 @@ declare namespace vpn { * @since 12 */ forwardingRoutes?: string; + + /** + * The array of addresses for remote server. + * @type {?Array} + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + remoteAddresses?: Array; + + /** + * The p12 cert password for the ipsec VPN network. + * @type {?string} + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + pkcs12Password?: string; + + /** + * The p12 cert data for the ipsec VPN network. + * @type {?Uint8Array} + * @syscap SystemCapability.Communication.NetManager.Vpn + * @systemapi Hide this for inner system use. + * @since 20 + */ + pkcs12FileData?: Uint8Array; } /** diff --git a/api/@ohos.net.vpnExtension.d.ts b/api/@ohos.net.vpnExtension.d.ts index 6b13b033f746e5b95df6bcc04f556f0fada9f683..be3befe38bda4af9f2aacf3404456bf2874afef0 100644 --- a/api/@ohos.net.vpnExtension.d.ts +++ b/api/@ohos.net.vpnExtension.d.ts @@ -175,6 +175,17 @@ declare namespace vpnExtension { * @since 11 */ create(config: VpnConfig): Promise; + + /** + * generate vpn id. + * + * @returns { Promise } The promise returns vpn id. + * @throws { BusinessError } 19900001 - Invalid parameter value. + * @throws { BusinessError } 19900002 - System internal error. + * @syscap SystemCapability.Communication.NetManager.Vpn + * @since 20 + */ + generateVpnId(): Promise; /** * Protect a socket from VPN connections. After protecting, data sent through this socket will go directly to the @@ -203,6 +214,18 @@ declare namespace vpnExtension { * @since 11 */ destroy(): Promise; + + /** + * Destroy the VPN network. + * + * @param { string } vpnId - vpn id. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 19900001 - Invalid parameter value. + * @throws { BusinessError } 19900002 - System internal error. + * @syscap SystemCapability.Communication.NetManager.Vpn + * @since 20 + */ + destroy(vpnId: string): Promise; } /** @@ -213,6 +236,14 @@ declare namespace vpnExtension { * @since 11 */ export interface VpnConfig { + /** + * The uuid for the VPN network. + * @type {?string} + * @syscap SystemCapability.Communication.NetManager.Vpn + * @since 20 + */ + vpnId?: string; + /** * The array of addresses for VPN interface. * diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index 27a9c8f7e9cb44ce6a734fd318638a5a2d09896a..f8856d93d5238657f464147adfafaca34c72d08b 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -133,6 +133,14 @@ declare namespace webSocket { */ caPath?: string; + /** + * Wheter or not to skip the verification of the server's certification. + * @type { ?boolean } + * @syscap SystemCapability.Communication.NetStack + * @since 20 + */ + skipServerCertVerification?: boolean; + /** * Client cert. * @type {?ClientCert} @@ -163,6 +171,28 @@ declare namespace webSocket { * @since 12 */ protocol?: string; + + /** + * Self defined interval of ping frame. + * default: 30. disable: 0. max: 30000. unit:second. + * Ping is performed at every pingInterval. + * @type {?int} + * @syscap SystemCapability.Communication.NetStack + * @since 21 + * @arkts 1.2 + */ + pingInterval?: int; + + /** + * Self defined timeout of pong frame. + * default: 30. max: 30000. unit:second. The value must be less than or equal to pingInterval. + * If no pong is received with the pongTimeout period, the websocket connection will be disconnected. + * @type {?int} + * @syscap SystemCapability.Communication.NetStack + * @since 21 + * @arkts 1.2 + */ + pongTimeout?: int; } /** diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index 0e42bac07501eed08bdd2cd481ef23be689c0444..8f27b949435df09950ea8e982b1c22c03dd86bc1 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -18,17 +18,13 @@ * @kit NotificationKit */ -import { AsyncCallback } from './@ohos.base'; import { BundleOption as _BundleOption } from './notification/NotificationCommonDef'; import { NotificationActionButton as _NotificationActionButton } from './notification/notificationActionButton'; import { NotificationBasicContent as _NotificationBasicContent } from './notification/notificationContent'; import { NotificationContent as _NotificationContent } from './notification/notificationContent'; import { NotificationLongTextContent as _NotificationLongTextContent } from './notification/notificationContent'; -import type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; import { NotificationMultiLineContent as _NotificationMultiLineContent } from './notification/notificationContent'; import { NotificationPictureContent as _NotificationPictureContent } from './notification/notificationContent'; -import type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; -import type { LiveViewTypes as _LiveViewTypes } from './notification/notificationContent'; import { NotificationSystemLiveViewContent as _NotificationSystemLiveViewContent } from './notification/notificationContent'; import { NotificationCapsule as _NotificationCapsule } from './notification/notificationContent'; import { NotificationButton as _NotificationButton } from './notification/notificationContent'; @@ -39,13 +35,30 @@ import { NotificationFlagStatus as _NotificationFlagStatus } from './notificatio import { NotificationRequest as _NotificationRequest } from './notification/notificationRequest'; import { UnifiedGroupInfo as _UnifiedGroupInfo } from './notification/notificationRequest'; import { DistributedOptions as _DistributedOptions } from './notification/notificationRequest'; -import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; -import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; import { NotificationSlot as _NotificationSlot } from './notification/notificationSlot'; import { NotificationSorting as _NotificationSorting } from './notification/notificationSorting'; import { NotificationTemplate as _NotificationTemplate } from './notification/notificationTemplate'; import { NotificationUserInput as _NotificationUserInput } from './notification/notificationUserInput'; + +/*** if arkts 1.1 */ +import { AsyncCallback } from './@ohos.base'; +import type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; +import type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; +import type { LiveViewTypes as _LiveViewTypes } from './notification/notificationContent'; +import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; +import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; import type UIAbilityContext from './application/UIAbilityContext'; +/*** endif */ +/*** if arkts 1.2 */ +import { AsyncCallback } from '@ohos.base'; +import type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; +import type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; +import type { LiveViewTypes as _LiveViewTypes } from './notification/notificationContent'; +import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; +import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; +import type UIAbilityContext from './application/UIAbilityContext'; +/*** endif */ + /** * The NotificationManager module provides notification management capabilities, covering notifications, @@ -63,7 +76,8 @@ import type UIAbilityContext from './application/UIAbilityContext'; * @syscap SystemCapability.Notification.Notification * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace notificationManager { /** @@ -71,7 +85,8 @@ declare namespace notificationManager { * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -89,7 +104,8 @@ declare namespace notificationManager { * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -112,7 +128,8 @@ declare namespace notificationManager { * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -130,12 +147,13 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function publish(request: NotificationRequest, callback: AsyncCallback): void; /** - * Publish a notification. This API uses a promise to return the URI of the file in the destination directory. + * Publish a notification. This API uses a promise to return the result. * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. @@ -153,7 +171,7 @@ declare namespace notificationManager { * @since 9 */ /** - * Publish a notification. This API uses a promise to return the URI of the file in the destination directory. + * Publish a notification. This API uses a promise to return the result. * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. @@ -176,7 +194,7 @@ declare namespace notificationManager { * @since 11 */ /** - * Publish a notification. This API uses a promise to return the URI of the file in the destination directory. + * Publish a notification. This API uses a promise to return the result. * If the ID and label of the new notification are the same as that of the previous notification, the new one replaces the previous one. * * @param { NotificationRequest } request - Content and related configuration of the notification to publish. @@ -198,7 +216,8 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function publish(request: NotificationRequest): Promise; @@ -280,7 +299,8 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function publish(request: NotificationRequest, userId: number, callback: AsyncCallback): void; @@ -362,7 +382,8 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function publish(request: NotificationRequest, userId: number): Promise; @@ -467,7 +488,8 @@ declare namespace notificationManager { * Cancels a notification with the specified ID. This API uses an asynchronous callback to return the result. * * @param { number } id - Notification ID. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -481,7 +503,8 @@ declare namespace notificationManager { * Cancels a notification with the specified ID. This API uses an asynchronous callback to return the result. * * @param { number } id - Notification ID. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -490,7 +513,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600007 - The notification does not exist. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(id: number, callback: AsyncCallback): void; @@ -499,7 +523,8 @@ declare namespace notificationManager { * * @param { number } id - Notification ID. * @param { string } label - Notification label. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -507,7 +532,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @throws { BusinessError } 1600007 - The notification does not exist. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(id: number, label: string, callback: AsyncCallback): void; @@ -524,7 +550,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @throws { BusinessError } 1600007 - The notification does not exist. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(id: number, label?: string): Promise; @@ -545,7 +572,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancel(representativeBundle: BundleOption, id: number): Promise; @@ -629,7 +657,8 @@ declare namespace notificationManager { /** * Cancels all notifications of this application. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -641,7 +670,8 @@ declare namespace notificationManager { /** * Cancels all notifications of this application. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -649,7 +679,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancelAll(callback: AsyncCallback): void; @@ -672,7 +703,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function cancelAll(): Promise; @@ -720,7 +752,8 @@ declare namespace notificationManager { * Adds a notification slot of a specified type. This API uses an asynchronous callback to return the result. * * @param { SlotType } type - Type of the notification slot to add. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -791,7 +824,7 @@ declare namespace notificationManager { /** * Obtains a notification slot of a specified type. This API uses an asynchronous callback to return the result. * - * @param { SlotType } slotType - Type of a notification slot, including social communication, service notification, and content consultation. + * @param { SlotType } slotType - Type of a notification slot, such as social communication, service notification, content consultation, and so on. * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined * and data is the obtained NotificationSlot; otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -837,7 +870,7 @@ declare namespace notificationManager { /** * Obtains all notification slots of this application. This API uses a promise to return the result. * - * @returns { Promise> } Promise used to return all notification slots of the current application. + * @returns { Promise> } Promise used to return the NotificationSlot array. * @throws { BusinessError } 1600001 - Internal error. * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. @@ -865,8 +898,9 @@ declare namespace notificationManager { /** * Removes a notification slot of a specified type for this application. This API uses an asynchronous callback to return the result. * - * @param { SlotType } slotType - Type of a notification slot, including social communication, service notification, and content consultation. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; otherwise, err is an error object. + * @param { SlotType } slotType - Type of a notification slot, such as social communication, service notification, content consultation, and so on. + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined; + * otherwise, err is an error object. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -880,7 +914,7 @@ declare namespace notificationManager { /** * Removes a notification slot of a specified type for this application. This API uses a promise to return the result. * - * @param { SlotType } slotType - Type of a notification slot, including social communication, service notification, and content consultation. + * @param { SlotType } slotType - Type of a notification slot, such as social communication, service notification, content consultation, and so on. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. @@ -936,7 +970,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setNotificationEnable(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; @@ -957,7 +992,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setNotificationEnable(bundle: BundleOption, enable: boolean): Promise; @@ -977,7 +1013,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback): void; @@ -997,7 +1034,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(bundle: BundleOption): Promise; @@ -1005,7 +1043,8 @@ declare namespace notificationManager { * Checks whether notification is enabled for the specified application. This API uses an asynchronous callback to return the result. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the notification is enabled, and false means the opposite. + * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the + * notification is enabled, and false means the opposite. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -1020,7 +1059,8 @@ declare namespace notificationManager { /** * Checks whether notification is enabled for the specified application. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the notification is enabled, and false means the opposite. + * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the + * notification is enabled, and false means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -1034,7 +1074,8 @@ declare namespace notificationManager { /** * Checks whether notification is enabled for the specified application. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the notification is enabled, and false means the opposite. + * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the + * notification is enabled, and false means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -1044,7 +1085,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(callback: AsyncCallback): void; @@ -1087,7 +1129,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(): Promise; @@ -1120,7 +1163,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600008 - The user does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(userId: number, callback: AsyncCallback): void; @@ -1140,7 +1184,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600008 - The user does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabled(userId: number): Promise; @@ -1181,7 +1226,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; @@ -1222,7 +1268,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function displayBadge(bundle: BundleOption, enable: boolean): Promise; @@ -1261,7 +1308,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback): void; @@ -1300,7 +1348,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function isBadgeDisplayed(bundle: BundleOption): Promise; @@ -1421,7 +1470,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback>): void; @@ -1464,7 +1514,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSlotByBundle(bundle: BundleOption, slotType: SlotType): Promise; @@ -1503,7 +1554,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSlotsByBundle(bundle: BundleOption): Promise>; @@ -1600,7 +1652,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllActiveNotifications(callback: AsyncCallback>): void; @@ -1617,7 +1670,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllActiveNotifications(): Promise>; @@ -1632,7 +1686,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotificationCount(callback: AsyncCallback): void; @@ -1644,7 +1699,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotificationCount(): Promise; @@ -1660,7 +1716,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotifications(callback: AsyncCallback>): void; @@ -1672,7 +1729,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotifications(): Promise>; @@ -2137,7 +2195,8 @@ declare namespace notificationManager { function isSupportDoNotDisturbMode(): Promise; /** - * Checks whether a specified template is supported before using NotificationTemplate to publish a notification. This API uses an asynchronous callback to return the result. + * Checks whether a specified template is supported before using NotificationTemplate to publish a notification. + * This API uses an asynchronous callback to return the result. * * @param { string } templateName - Template name. Currently, only downloadTemplate is supported. * @param { AsyncCallback } callback - Callback used to return the result. The value true means that the specified template is supported, @@ -2156,7 +2215,8 @@ declare namespace notificationManager { * Checks whether a specified template is supported before using NotificationTemplate to publish a notification. This API uses a promise to return the result. * * @param { string } templateName - Template name. Currently, only downloadTemplate is supported. - * @returns { Promise } Promise used to return the result. The value true means that the specified template is supported, and false means the opposite. + * @returns { Promise } Promise used to return the result. The value true means that the specified template + * is supported, and false means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -2266,7 +2326,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @StageModelOnly * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function requestEnableNotification(context: UIAbilityContext, callback: AsyncCallback): void; @@ -2357,7 +2418,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @StageModelOnly * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function requestEnableNotification(context: UIAbilityContext): Promise; @@ -2440,9 +2502,10 @@ declare namespace notificationManager { function setDistributedEnable(enable: boolean): Promise; /** - * Checks whether distributed notification is enabled on this device. This API uses an asynchronous callback to return the result. + * Checks whether the device supports cross-device notifications. This API uses an asynchronous callback to return the result. * - * @param { AsyncCallback } callback - Callback used to return the result. The value true means that distributed notification is enabled, and false means the opposite. + * @param { AsyncCallback } callback - Callback used to return the result. The value true means that + * distributed notification is enabled, and false means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. @@ -2455,9 +2518,10 @@ declare namespace notificationManager { function isDistributedEnabled(callback: AsyncCallback): void; /** - * Checks whether distributed notification is enabled on this device. This API uses a promise to return the result. + * Checks whether the device supports cross-device notifications. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. The value true means that distributed notification is enabled, and false means the opposite. + * @returns { Promise } Promise used to return the result. The value true means that distributed notification + * is enabled, and false means the opposite. * @throws { BusinessError } 1600001 - Internal error. * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. @@ -2729,6 +2793,27 @@ declare namespace notificationManager { */ function isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise; + /** + * Sets whether applications supports distributed notification. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { Array } bundleEnableInfos - The enable bundles. + * @param { string } deviceType - The device type. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 801 - Capability not supported. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @throws { BusinessError } 1600003 - Failed to connect to the service. + * @throws { BusinessError } 1600010 - Distributed operation failed. + * @throws { BusinessError } 1600012 - No memory space. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + */ + function setDistributedEnableByBundles(bundleEnableInfos: Array, deviceType: string): Promise; + /** * Sets whether an application supports smart reminders across devices. * @@ -2944,7 +3029,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setNotificationEnableSlot( bundle: BundleOption, @@ -2998,7 +3084,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setNotificationEnableSlot( bundle: BundleOption, @@ -3073,7 +3160,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean, isForceControl?: boolean): Promise; @@ -3114,7 +3202,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback): void; @@ -3155,7 +3244,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise; @@ -3568,7 +3658,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function triggerSystemLiveView(bundle: BundleOption, notificationId: number, buttonOptions: ButtonOptions): Promise; @@ -3603,7 +3694,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function subscribeSystemLiveView(subscriber: SystemLiveViewSubscriber): Promise; @@ -3644,7 +3736,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setSlotFlagsByBundle(bundle: BundleOption, slotFlags: number): Promise; @@ -3683,7 +3776,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSlotFlagsByBundle(bundle: BundleOption): Promise; @@ -3734,7 +3828,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function addDoNotDisturbProfile(templates: Array): Promise; @@ -3773,7 +3868,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function removeDoNotDisturbProfile(templates: Array): Promise; @@ -3818,7 +3914,7 @@ declare namespace notificationManager { /** * Opens the notification settings page of the application, which is displayed in semi-modal mode and can be used to set - * the notification enabling and notification mode. This API uses a promise to return the URI of the file in the destination directory. + * the notification enabling and notification mode. This API uses a promise to return the result. * * @param { UIAbilityContext } context - Ability context bound to the notification settings page. * @returns { Promise } The promise returned by the function. @@ -3831,7 +3927,7 @@ declare namespace notificationManager { */ /** * Opens the notification settings page of the application, which is displayed in semi-modal mode and can be used to set - * the notification enabling and notification mode. This API uses a promise to return the URI of the file in the destination directory. + * the notification enabling and notification mode. This API uses a promise to return the result. * * @param { UIAbilityContext } context - Ability context bound to the notification settings page. * @returns { Promise } The promise returned by the function. @@ -3885,26 +3981,26 @@ declare namespace notificationManager { function getDoNotDisturbProfile(id: number): Promise; /** - * Set target device status. + * Disabling notifications based on the application list. * - * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { string } deviceType - The device. - * @param { number } status - The device status. + * @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.MANAGE_EDM_POLICY + * @param { boolean } disabled - The switch of disableNotification. + * @param { Array } bundleList - The bundles of disableNotification. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 */ - function setTargetDeviceStatus(deviceType: string, status: number): Promise; - /** * Disabling notifications based on the application list. * - * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.MANAGE_EDM_POLICY * @param { boolean } disabled - The switch of disableNotification. * @param { Array } bundleList - The bundles of disableNotification. * @returns { Promise } The promise returned by the function. @@ -3912,14 +4008,52 @@ declare namespace notificationManager { * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 1600001 - Internal error. * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function disableNotificationFeature(disabled:boolean, bundleList: Array): Promise; + /** + * Disabling notifications based on the application list. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.MANAGE_EDM_POLICY + * @param { boolean } disabled - The switch of disableNotification. + * @param { Array } bundleList - The bundles of disableNotification. + * @param { number } userId - the userId. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + */ + function disableNotificationFeature(disabled: boolean, bundleList: Array, userId: number): Promise; + + /** + * Set target device status. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { string } deviceType - The device. + * @param { number } status - The device status. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. 3. Parameter verification failed. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 18 + */ + function setTargetDeviceStatus(deviceType: string, status: number): Promise; + /** * Set notification slot synchronization switch. * @@ -3935,7 +4069,7 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 - */ + */ function setDistributedEnabledBySlot(slot: SlotType, deviceType: string, enabled: boolean): Promise; /** @@ -3952,16 +4086,156 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 - */ + */ function isDistributedEnabledBySlot(slot: SlotType, deviceType: string): Promise; + /** + * Obtains whether the device supports distributed notification. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { string } deviceType - The device type. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + */ + function isDistributedEnabled(deviceType: string): Promise; + + /** + * Sets whether the device supports distributed notification. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { boolean } enable - Set enable or not. + * @param { string } deviceType - The device type. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + */ + function setDistributedEnabled(enable: boolean, deviceType: string): Promise; + + /** + * Get distributed device list. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @returns { Promise> } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + */ + function getDistributedDeviceList(): Promise>; + + /** + * Set the switch status of silent reminders. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { BundleOption } bundle - The bundle option. + * @param { boolean } enabled - Set enable or not. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @throws { BusinessError } 1600003 - Failed to connect to the service. + * @throws { BusinessError } 1600012 - No memory space. + * @throws { BusinessError } 17700001 - The specified bundle name was not found. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + function setSilentReminderEnabled(bundle: BundleOption, enabled: boolean): Promise; + + /** + * Obtains whether an application silent reminder is enable. + * + * @permission ohos.permission.NOTIFICATION_CONTROLLER + * @param { BundleOption } bundle - The bundle option. + * @returns { Promise } Returns whether an application silent reminder is enable. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @throws { BusinessError } 1600003 - Failed to connect to the service. + * @throws { BusinessError } 1600012 - No memory space. + * @throws { BusinessError } 17700001 - The specified bundle name was not found. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + function isSilentReminderEnabled(bundle: BundleOption): Promise; + + /** + * Represents the state of a switch, + * distinguishing system defaults from user modifications. + * + * @enum { number } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + export enum SwitchState { + /** + * User-modified OFF state, + * Represents an off state that was explicitly set by the user. + * + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + USER_MODIFIED_OFF = 0, + + /** + * User-modified ON state, + * Represents an on state that was explicitly set by the user. + * + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + USER_MODIFIED_ON = 1, + + /** + * System default OFF state, + * Represents the initial off state before any user modification. + * + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_DEFAULT_OFF = 2, + + /** + * System default ON state, + * Represents the initial on state before any user modification. + * + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_DEFAULT_ON = 3, + } + /** * Describes a button option for a triggering. * * @typedef ButtonOptions * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface ButtonOptions { /** @@ -3971,7 +4245,8 @@ declare namespace notificationManager { * @type { string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ buttonName: string; } @@ -3982,7 +4257,8 @@ declare namespace notificationManager { * @typedef SystemLiveViewSubscriber * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface SystemLiveViewSubscriber { /** @@ -3991,7 +4267,8 @@ declare namespace notificationManager { * @type { ?function } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onResponse?: (notificationId: number, buttonOptions: ButtonOptions) => void; } @@ -4002,7 +4279,8 @@ declare namespace notificationManager { * @typedef NotificationCheckInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationCheckInfo { /** @@ -4012,7 +4290,8 @@ declare namespace notificationManager { * @type { string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -4023,7 +4302,8 @@ declare namespace notificationManager { * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ notificationId: number; @@ -4034,7 +4314,8 @@ declare namespace notificationManager { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ label?: string; @@ -4045,7 +4326,8 @@ declare namespace notificationManager { * @type { ContentType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ contentType: ContentType; @@ -4056,7 +4338,8 @@ declare namespace notificationManager { * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ creatorUserId: number; @@ -4067,7 +4350,8 @@ declare namespace notificationManager { * @type { SlotType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ slotType: SlotType; @@ -4078,7 +4362,8 @@ declare namespace notificationManager { * @type { ?Record } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfos?: Record; } @@ -4089,7 +4374,8 @@ declare namespace notificationManager { * @typedef NotificationCheckResult * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationCheckResult { /** @@ -4099,7 +4385,8 @@ declare namespace notificationManager { * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ code: number; @@ -4110,7 +4397,8 @@ declare namespace notificationManager { * @type { string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; } @@ -4121,6 +4409,7 @@ declare namespace notificationManager { * @typedef NotificationSetting * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ export interface NotificationSetting { /** @@ -4129,6 +4418,7 @@ declare namespace notificationManager { * @type { boolean } * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ vibrationEnabled: boolean; @@ -4138,6 +4428,7 @@ declare namespace notificationManager { * @type { boolean } * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ soundEnabled: boolean; } @@ -4155,7 +4446,8 @@ declare namespace notificationManager { * @enum { number } * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum SlotType { /** @@ -4169,7 +4461,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN_TYPE = 0, @@ -4184,7 +4477,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SOCIAL_COMMUNICATION = 1, @@ -4199,7 +4493,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SERVICE_INFORMATION = 2, @@ -4214,24 +4509,28 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_INFORMATION = 3, /** * Live view. A third-party application cannot directly create a notification of this slot type. After the system proxy creates a system live view, - * the third-party application releases a notification with the same ID to update the specified content. This type corresponds to SlotLevel being LEVEL_DEFAULT. + * the third-party application releases a notification with the same ID to update the specified content. + * This type corresponds to SlotLevel being LEVEL_DEFAULT. * * @syscap SystemCapability.Notification.Notification * @since 11 */ /** * Live view. A third-party application cannot directly create a notification of this slot type. After the system proxy creates a system live view, - * the third-party application releases a notification with the same ID to update the specified content. This type corresponds to SlotLevel being LEVEL_DEFAULT. + * the third-party application releases a notification with the same ID to update the specified content. + * This type corresponds to SlotLevel being LEVEL_DEFAULT. * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LIVE_VIEW = 4, @@ -4248,7 +4547,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOMER_SERVICE = 5, @@ -4257,7 +4557,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMERGENCY_INFORMATION = 10, @@ -4272,7 +4573,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OTHER_TYPES = 0xFFFF } @@ -4291,7 +4593,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ContentType { /** @@ -4306,7 +4609,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_BASIC_TEXT, @@ -4322,7 +4626,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_LONG_TEXT, @@ -4337,7 +4642,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_PICTURE, @@ -4352,7 +4658,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_CONVERSATION, @@ -4368,7 +4675,8 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_MULTILINE, @@ -4385,7 +4693,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_SYSTEM_LIVE_VIEW, @@ -4400,7 +4709,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_CONTENT_LIVE_VIEW, } @@ -4410,14 +4720,16 @@ declare namespace notificationManager { * * @enum { number } * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum SlotLevel { /** * Notification is disabled. * * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEVEL_NONE = 0, @@ -4425,7 +4737,8 @@ declare namespace notificationManager { * Notification is enabled, but the notification icon is not displayed in the status bar, with no banner and alert tone. * * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEVEL_MIN = 1, @@ -4433,7 +4746,8 @@ declare namespace notificationManager { * Notification is enabled, and the notification icon is displayed in the status bar, with no banner and alert tone. * * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEVEL_LOW = 2, @@ -4441,7 +4755,8 @@ declare namespace notificationManager { * Notification is enabled, and the notification icon is displayed in the status bar, with an alert tone but no banner. * * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEVEL_DEFAULT = 3, @@ -4449,7 +4764,8 @@ declare namespace notificationManager { * Notification is enabled, and the notification icon is displayed in the status bar, with an alert tone and banner. * * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEVEL_HIGH = 4 } @@ -4460,7 +4776,8 @@ declare namespace notificationManager { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum DoNotDisturbType { /** @@ -4468,7 +4785,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_NONE = 0, @@ -4477,7 +4795,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_ONCE = 1, @@ -4486,7 +4805,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_DAILY = 2, @@ -4495,7 +4815,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CLEARLY = 3 } @@ -4506,7 +4827,8 @@ declare namespace notificationManager { * @typedef DoNotDisturbDate * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DoNotDisturbDate { /** @@ -4515,7 +4837,8 @@ declare namespace notificationManager { * @type { DoNotDisturbType } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ type: DoNotDisturbType; @@ -4525,7 +4848,8 @@ declare namespace notificationManager { * @type { Date } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ begin: Date; @@ -4535,10 +4859,55 @@ declare namespace notificationManager { * @type { Date } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ end: Date; } + + /** + * Describes a DistributedBundleEnableInfo instance. + * + * @typedef DistributedBundleEnableInfo + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + export interface DistributedBundleEnableInfo { + /** + * The bundle name. + * + * @type { string } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + bundleName: string; + + /** + * The uid. + * + * @type { number } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + uid: number; + + /** + * Indicates whether application is enabled. + * + * @type { ?boolean } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + enable?: boolean; + } /** * Describes a DoNotDisturbProfile instance. @@ -4546,7 +4915,8 @@ declare namespace notificationManager { * @typedef DoNotDisturbProfile * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DoNotDisturbProfile { /** @@ -4555,7 +4925,8 @@ declare namespace notificationManager { * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -4565,7 +4936,8 @@ declare namespace notificationManager { * @type { string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -4575,7 +4947,8 @@ declare namespace notificationManager { * @type { ?Array } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ trustlist?: Array; } @@ -4586,7 +4959,8 @@ declare namespace notificationManager { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum DeviceRemindType { /** @@ -4594,7 +4968,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ IDLE_DONOT_REMIND = 0, @@ -4603,7 +4978,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ IDLE_REMIND = 1, @@ -4612,7 +4988,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTIVE_DONOT_REMIND = 2, @@ -4621,7 +4998,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTIVE_REMIND = 3 } @@ -4632,7 +5010,8 @@ declare namespace notificationManager { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum SourceType { /** @@ -4640,7 +5019,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_NORMAL = 0, @@ -4649,7 +5029,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CONTINUOUS = 1, @@ -4658,7 +5039,8 @@ declare namespace notificationManager { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_TIMER = 2 } @@ -4669,14 +5051,16 @@ declare namespace notificationManager { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum NotificationControlFlagStatus { /** * Manipulating of the enumeration by bitwise-or operation represents the closing of ringtone. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_SOUND = 1 << 0, @@ -4684,7 +5068,8 @@ declare namespace notificationManager { * Manipulating of the enumeration by bitwise-or operation represents the closing of lock screen. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_LOCKSCREEN = 1 << 1, @@ -4692,7 +5077,8 @@ declare namespace notificationManager { * Manipulating of the enumeration by bitwise-or operation represents the closing of banner. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_BANNER = 1 << 2, @@ -4700,7 +5086,8 @@ declare namespace notificationManager { * Manipulating of the enumeration by bitwise-or operation represents the closing of light screen. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_LIGHT_SCREEN = 1 << 3, @@ -4708,7 +5095,8 @@ declare namespace notificationManager { * Manipulating of the enumeration by bitwise-or operation represents the closing of vibration. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_VIBRATION = 1 << 4, @@ -4716,7 +5104,8 @@ declare namespace notificationManager { * Manipulating of the enumeration by bitwise-or operation represents the closing of status bar icon. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION_STATUS_CLOSE_STATUSBAR_ICON = 1 << 5 } @@ -4726,7 +5115,8 @@ declare namespace notificationManager { * * @typedef { _BundleOption } BundleOption * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type BundleOption = _BundleOption; @@ -4735,7 +5125,8 @@ declare namespace notificationManager { * * @typedef { _NotificationActionButton } NotificationActionButton * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationActionButton = _NotificationActionButton; @@ -4751,7 +5142,8 @@ declare namespace notificationManager { * @typedef { _NotificationBasicContent } NotificationBasicContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationBasicContent = _NotificationBasicContent; @@ -4767,7 +5159,8 @@ declare namespace notificationManager { * @typedef { _NotificationContent } NotificationContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationContent = _NotificationContent; @@ -4783,7 +5176,8 @@ declare namespace notificationManager { * @typedef { _NotificationLongTextContent } NotificationLongTextContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationLongTextContent = _NotificationLongTextContent; @@ -4793,7 +5187,8 @@ declare namespace notificationManager { * @typedef { _NotificationLiveViewContent } NotificationLiveViewContent * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationLiveViewContent = _NotificationLiveViewContent; @@ -4809,7 +5204,8 @@ declare namespace notificationManager { * @typedef { _NotificationMultiLineContent } NotificationMultiLineContent * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationMultiLineContent = _NotificationMultiLineContent; @@ -4818,7 +5214,8 @@ declare namespace notificationManager { * * @typedef { _NotificationPictureContent } NotificationPictureContent * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationPictureContent = _NotificationPictureContent; @@ -4827,7 +5224,8 @@ declare namespace notificationManager { * * @typedef { _NotificationSystemLiveViewContent } NotificationSystemLiveViewContent * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationSystemLiveViewContent = _NotificationSystemLiveViewContent; @@ -4837,7 +5235,8 @@ declare namespace notificationManager { * @typedef { _NotificationFlags } NotificationFlags * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationFlags = _NotificationFlags; @@ -4847,7 +5246,8 @@ declare namespace notificationManager { * @typedef { _NotificationFlagStatus } NotificationFlagStatus * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationFlagStatus = _NotificationFlagStatus; @@ -4863,7 +5263,8 @@ declare namespace notificationManager { * @typedef { _NotificationRequest } NotificationRequest * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationRequest = _NotificationRequest; @@ -4873,7 +5274,8 @@ declare namespace notificationManager { * @typedef { _UnifiedGroupInfo } UnifiedGroupInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export type UnifiedGroupInfo = _UnifiedGroupInfo; @@ -4883,7 +5285,8 @@ declare namespace notificationManager { * @typedef { _NotificationFilter } NotificationFilter * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationFilter = _NotificationFilter; @@ -4893,7 +5296,8 @@ declare namespace notificationManager { * @typedef { _NotificationCheckRequest } NotificationCheckRequest * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationCheckRequest = _NotificationCheckRequest; @@ -4902,7 +5306,8 @@ declare namespace notificationManager { * * @typedef { _DistributedOptions } DistributedOptions * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type DistributedOptions = _DistributedOptions; @@ -4911,7 +5316,8 @@ declare namespace notificationManager { * * @typedef { _NotificationSlot } NotificationSlot * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationSlot = _NotificationSlot; @@ -4921,7 +5327,8 @@ declare namespace notificationManager { * @typedef { _LiveViewStatus } LiveViewStatus * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type LiveViewStatus = _LiveViewStatus; @@ -4931,7 +5338,8 @@ declare namespace notificationManager { * @typedef { _LiveViewTypes } LiveViewTypes * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export type LiveViewTypes = _LiveViewTypes; @@ -4941,7 +5349,8 @@ declare namespace notificationManager { * @typedef { _NotificationSorting } NotificationSorting * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationSorting = _NotificationSorting; @@ -4950,7 +5359,8 @@ declare namespace notificationManager { * * @typedef { _NotificationTemplate } NotificationTemplate * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationTemplate = _NotificationTemplate; @@ -4959,7 +5369,8 @@ declare namespace notificationManager { * * @typedef { _NotificationUserInput } NotificationUserInput * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationUserInput = _NotificationUserInput; @@ -4968,7 +5379,8 @@ declare namespace notificationManager { * * @typedef { _NotificationCapsule } NotificationCapsule * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationCapsule = _NotificationCapsule; @@ -4977,7 +5389,8 @@ declare namespace notificationManager { * * @typedef { _NotificationButton } NotificationButton * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationButton = _NotificationButton; @@ -4986,7 +5399,8 @@ declare namespace notificationManager { * * @typedef { _NotificationTime } NotificationTime * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationTime = _NotificationTime; @@ -4995,7 +5409,8 @@ declare namespace notificationManager { * * @typedef { _NotificationProgress } NotificationProgress * @syscap SystemCapability.Notification.Notification - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationProgress = _NotificationProgress; } diff --git a/api/@ohos.notificationSubscribe.d.ts b/api/@ohos.notificationSubscribe.d.ts index dab12eddc56480fcacd4a3d7cda6399178aeb63a..029cc1dd14e050174b0abe56b390b0b6b14b0916 100644 --- a/api/@ohos.notificationSubscribe.d.ts +++ b/api/@ohos.notificationSubscribe.d.ts @@ -24,13 +24,19 @@ import { NotificationSubscribeInfo as _NotificationSubscribeInfo } from './notif import { NotificationSubscriber as _NotificationSubscriber } from './notification/notificationSubscriber'; import { SubscribeCallbackData as _SubscribeCallbackData } from './notification/notificationSubscriber'; import { EnabledNotificationCallbackData as _EnabledNotificationCallbackData } from './notification/notificationSubscriber'; +/*** if arkts 1.1 */ import type { BadgeNumberCallbackData as _BadgeNumberCallbackData } from './notification/notificationSubscriber'; +/*** endif */ +/*** if arkts 1.2 */ +import type { BadgeNumberCallbackData as _BadgeNumberCallbackData } from './notification/notificationSubscriber'; +/*** endif */ /** * @namespace notificationSubscribe * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace notificationSubscribe { /** @@ -39,7 +45,8 @@ declare namespace notificationSubscribe { * @typedef NotificationKey * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface NotificationKey { /** @@ -48,7 +55,8 @@ declare namespace notificationSubscribe { * @type { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ id: number; @@ -58,7 +66,8 @@ declare namespace notificationSubscribe { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ label?: string; } @@ -69,7 +78,8 @@ declare namespace notificationSubscribe { * @enum { number } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum RemoveReason { /** @@ -77,7 +87,8 @@ declare namespace notificationSubscribe { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ CLICK_REASON_REMOVE = 1, @@ -86,7 +97,8 @@ declare namespace notificationSubscribe { * * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL_REASON_REMOVE = 2 } @@ -107,7 +119,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function subscribe(subscriber: NotificationSubscriber, callback: AsyncCallback): void; @@ -125,7 +138,7 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since 11 */ function subscribeSelf(subscriber: NotificationSubscriber): Promise; @@ -146,7 +159,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function subscribe( subscriber: NotificationSubscriber, @@ -171,7 +185,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function subscribe(subscriber: NotificationSubscriber, info?: NotificationSubscribeInfo): Promise; @@ -184,7 +199,7 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. 3. Parameter verification failed. + *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. @@ -192,6 +207,22 @@ declare namespace notificationSubscribe { * @systemapi * @since 9 */ + /** + * Unsubscribe notifications. + * + * @param { NotificationSubscriber } subscriber - The notification subscriber. + * @param { AsyncCallback } callback - The callback of unsubscribe. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @throws { BusinessError } 1600003 - Failed to connect to the service. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ function unsubscribe(subscriber: NotificationSubscriber, callback: AsyncCallback): void; /** @@ -203,7 +234,7 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. 3. Parameter verification failed. + *
2. Incorrect parameter types. 3. Parameter verification failed. * @throws { BusinessError } 1600001 - Internal error. * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @throws { BusinessError } 1600003 - Failed to connect to the service. @@ -211,6 +242,22 @@ declare namespace notificationSubscribe { * @systemapi * @since 9 */ + /** + * Unsubscribe notifications. + * + * @param { NotificationSubscriber } subscriber - The notification subscriber. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 202 - Not system application to call the interface. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. + * @throws { BusinessError } 1600003 - Failed to connect to the service. + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ function unsubscribe(subscriber: NotificationSubscriber): Promise; /** @@ -232,7 +279,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove( bundle: BundleOption, @@ -260,7 +308,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove(bundle: BundleOption, notificationKey: NotificationKey, reason: RemoveReason): Promise; @@ -281,7 +330,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600007 - The notification does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback): void; @@ -302,7 +352,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove(hashCodes: Array, reason: RemoveReason, callback: AsyncCallback): void; @@ -323,7 +374,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600007 - The notification does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove(hashCode: string, reason: RemoveReason): Promise; @@ -343,7 +395,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function remove(hashCodes: Array, reason: RemoveReason): Promise; @@ -449,7 +502,7 @@ declare namespace notificationSubscribe { * Trigger notification cross-device operation. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { string } [hashcode] - The notification identifier. + * @param { string } hashcode - The notification identifier. * @param { OperationInfo } [operationInfo] - The interactive information. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -460,7 +513,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600021 - Distributed operation timed out. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function distributeOperation(hashcode: string, operationInfo?: OperationInfo): Promise; @@ -470,7 +524,8 @@ declare namespace notificationSubscribe { * @typedef OperationInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface OperationInfo { /** @@ -479,7 +534,8 @@ declare namespace notificationSubscribe { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ actionName?: string; @@ -489,7 +545,8 @@ declare namespace notificationSubscribe { * @type { ?string } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ userInput?: string; @@ -500,6 +557,7 @@ declare namespace notificationSubscribe { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 + * @arkts 1.1&1.2 */ operationType?: number; @@ -510,6 +568,7 @@ declare namespace notificationSubscribe { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 + * @arkts 1.1&1.2 */ buttonIndex?: number; } @@ -520,7 +579,8 @@ declare namespace notificationSubscribe { * @typedef { _BundleOption } BundleOption * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type BundleOption = _BundleOption; @@ -530,7 +590,8 @@ declare namespace notificationSubscribe { * @typedef { _NotificationSubscribeInfo } NotificationSubscribeInfo * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationSubscribeInfo = _NotificationSubscribeInfo; @@ -541,7 +602,8 @@ declare namespace notificationSubscribe { * @typedef { _NotificationSubscriber } NotificationSubscriber * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type NotificationSubscriber = _NotificationSubscriber; @@ -552,7 +614,8 @@ declare namespace notificationSubscribe { * @typedef { _SubscribeCallbackData } SubscribeCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type SubscribeCallbackData = _SubscribeCallbackData; @@ -562,7 +625,8 @@ declare namespace notificationSubscribe { * @typedef { _EnabledNotificationCallbackData } EnabledNotificationCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type EnabledNotificationCallbackData = _EnabledNotificationCallbackData; @@ -572,7 +636,8 @@ declare namespace notificationSubscribe { * @typedef { _BadgeNumberCallbackData } BadgeNumberCallbackData * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type BadgeNumberCallbackData = _BadgeNumberCallbackData; } diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index c5d0d860fd0e1477f49c7494119bc4c40078c961..e199aa32ad88b4909fa62e2aa4075b044cb676f7 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -48,10 +48,19 @@ declare namespace pasteboard { */ /** * Indicates the maximum number of records allowed in a PasteData object. + * No limit the number of records in a PasteData object since API version 10. + * @constant + * @syscap SystemCapability.MiscServices.Pasteboard + * @since 10 + */ + /** + * Indicates the maximum number of records allowed in a PasteData object. + * No limit the number of records in a PasteData object since API version 10. * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ const MAX_RECORD_NUM = 512; /** @@ -638,7 +647,7 @@ declare namespace pasteboard { * @syscap SystemCapability.MiscServices.Pasteboard * @since 7 * @deprecated since 9 - * @useinstead ohos.pasteboard.pasteboard#convertToTextV9 + * @useinstead ohos.pasteboard.pasteboard#toPlainText */ convertToText(callback: AsyncCallback): void; @@ -648,7 +657,7 @@ declare namespace pasteboard { * @syscap SystemCapability.MiscServices.Pasteboard * @since 7 * @deprecated since 9 - * @useinstead ohos.pasteboard.pasteboard#convertToTextV9 + * @useinstead ohos.pasteboard.pasteboard#toPlainText */ convertToText(): Promise; diff --git a/api/@ohos.pluginComponent.d.ets b/api/@ohos.pluginComponent.d.ets deleted file mode 100644 index 5f79e3d5e1f839e9f833ff1489d5993f2f0c87c2..0000000000000000000000000000000000000000 --- a/api/@ohos.pluginComponent.d.ets +++ /dev/null @@ -1,679 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ - -import { AsyncCallback } from './@ohos.base'; -import Want from './@ohos.app.ability.Want'; - -/** - * Plugin component template property. - * - * @interface PluginComponentTemplate - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Plugin component template property. - * - * @interface PluginComponentTemplate - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -export interface PluginComponentTemplate { - /** - * Defines the source - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the source - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - source: string; - - /** - * Defines the ability - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the ability - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - ability: string; -} - -/** - * Plugin component manager interface. - * - * @namespace pluginComponentManager - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Plugin component manager interface. - * - * @namespace pluginComponentManager - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ -declare namespace pluginComponentManager { - /** - * Defines KVObject - * - * @typedef { object } KVObject - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines KVObject - * - * @typedef { object } KVObject - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export type KVObject = Record> - - /** - * Plugin component push parameters. - * - * @interface PushParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component push parameters. - * - * @interface PushParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface PushParameters { - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - want: Want; - - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - name: string; - - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - data: KVObject; - - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraData: KVObject; - - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - jsonPath?: string; - } - - /** - * Plugin component push parameters which is used in push function. - * - * @interface PushParameterForStage - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - export interface PushParameterForStage { - /** - * Defines owner. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - owner: Want; - - /** - * Defines target. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - target: Want; - - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - name: string; - - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - data: KVObject; - - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - extraData: KVObject; - - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - jsonPath?: string; - } - - /** - * Plugin component request parameters. - * - * @interface RequestParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request parameters. - * - * @interface RequestParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface RequestParameters { - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - want: Want; - - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - name: string; - - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - data: KVObject; - - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - jsonPath?: string; - } - - /** - * Plugin component request parameters which is used in request function. - * - * @interface RequestParameterForStage - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - export interface RequestParameterForStage { - /** - * Defines owner. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - owner: Want; - - /** - * Defines target. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - target: Want; - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - name: string; - - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - data: KVObject; - - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 9 - */ - jsonPath?: string; - } - - /** - * Plugin component request callback parameters. - * - * @interface RequestCallbackParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request callback parameters. - * - * @interface RequestCallbackParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface RequestCallbackParameters { - - /** - * Defines componentTemplate. - * - * @type { PluginComponentTemplate } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines componentTemplate. - * - * @type { PluginComponentTemplate } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - componentTemplate: PluginComponentTemplate; - - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - data: KVObject; - - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraData: KVObject; - } - - /** - * Plugin component request event result value. - * - * @interface RequestEventResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request event result value. - * - * @interface RequestEventResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface RequestEventResult { - /** - * Defines template. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines template. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - template?: string; - - /** - * Defines data. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - data?: KVObject; - - /** - * Defines extraData. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - extraData?: KVObject; - } - - /** - * Plugin component push event callback. - * - * @typedef { function } OnPushEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component push event callback. - * - * @typedef { function } OnPushEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export type OnPushEventCallback = (source: Want, template: PluginComponentTemplate, data: KVObject, - extraData: KVObject) => void; - - /** - * Plugin component request event callback. - * - * @typedef { function } OnRequestEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request event callback. - * - * @typedef { function } OnRequestEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - - export type OnRequestEventCallback = (source: Want, name: string, data: KVObject) => RequestEventResult; - - /** - * Plugin component push method. - * - * @param { PushParameters } param - * @param { AsyncCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component push method. - * - * @param { PushParameters } param - * @param { AsyncCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function push(param: PushParameters, callback: AsyncCallback): void; - - /** - * Plugin component request method. - * - * @param { RequestParameters } param - * @param { AsyncCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request method. - * - * @param { RequestParameters } param - * @param { AsyncCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function request(param: RequestParameters, callback: AsyncCallback): void; - - /** - * Plugin component push method used to send the information of the template it provides. - * - * @param { PushParameterForStage } param - Plugin component push parameters for stage. - * @param { AsyncCallback } callback - Plugin component push event callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @StageModelOnly - * @since 9 - */ - export function push(param: PushParameterForStage, callback: AsyncCallback): void; - - /** - * Plugin component request method used to send a request for the information of the template it wants. - * - * @param { RequestParameterForStage } param - Plugin component request parameters for stage. - * @param { AsyncCallback } callback - Plugin component request event callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @StageModelOnly - * @since 9 - */ - export function request(param: RequestParameterForStage, callback: AsyncCallback): void; - - /** - * Plugin component event listener. - * - * @param { string } eventType - * @param { OnPushEventCallback | OnRequestEventCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component event listener. - * - * @param { string } eventType - * @param { OnPushEventCallback | OnRequestEventCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function on(eventType: string, callback: OnPushEventCallback | OnRequestEventCallback): void; -} - -export default pluginComponentManager; \ No newline at end of file diff --git a/api/@ohos.power.d.ts b/api/@ohos.power.d.ts index 0bdb72dc4fa982c01aa1098894afdb170ae9ecb5..f7a93a0a0f6dbb5860c020666009eb13bec31bba 100644 --- a/api/@ohos.power.d.ts +++ b/api/@ohos.power.d.ts @@ -25,7 +25,8 @@ import { AsyncCallback, BusinessError } from './@ohos.base'; * * @namespace power * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace power { /** @@ -41,7 +42,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ function shutdown(reason: string): void; @@ -73,7 +75,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function reboot(reason: string): void; @@ -106,7 +109,8 @@ declare namespace power { * * @returns { boolean } Returns true if the device is active; returns false otherwise. * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isActive(): boolean; @@ -134,7 +138,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ function wakeup(detail: string): void; @@ -170,7 +175,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ function suspend(isImmediate?: boolean): void; @@ -179,7 +185,8 @@ declare namespace power { * * @returns { DevicePowerMode } The power mode {@link DevicePowerMode} of current device . * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getPowerMode(): DevicePowerMode; @@ -195,7 +202,8 @@ declare namespace power { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setPowerMode(mode: DevicePowerMode, callback: AsyncCallback): void; @@ -211,7 +219,8 @@ declare namespace power { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setPowerMode(mode: DevicePowerMode): Promise; @@ -221,7 +230,8 @@ declare namespace power { * @returns { boolean } Returns true if the device is in idle mode; returns false otherwise. * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function isStandby(): boolean; @@ -247,7 +257,8 @@ declare namespace power { * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ function hibernate(clearMemory: boolean): void; @@ -266,53 +277,129 @@ declare namespace power { * Sets the timeout duration(ms) for turning off the screen with permission. * * @permission ohos.permission.POWER_MANAGER - * @param { number } timeout - Indicates duration(ms) for turning off the screen. The value -1 means restore the default value. + * @param { long } timeout - Indicates duration(ms) for turning off the screen. The value -1 means restore the default value. * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Parameter verification failed. * @throws { BusinessError } 4900101 - Failed to connect to the service. * @syscap SystemCapability.PowerManager.PowerManager.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setScreenOffTime(timeout: number): void; + function setScreenOffTime(timeout: long): void; + + /** + * Refresh the device activity (such as resetting the screen-off time, etc). + * Available only when the device is active, see {@link isActive} + * + * @permission ohos.permission.REFRESH_USER_ACTION + * @param { string } reason Indicates the reason of refreshing activity. The reason parameter must be of type string. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 4900101 - Failed to connect to the service. + * @throws { BusinessError } 4900201 - The device activity is being refreshed too frequently; the minimum time + * interval is 100 ms. + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @systemapi + * @since 20 + */ + function refreshActivity(reason: string): void; /** * Power mode of a device. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum DevicePowerMode { /** * Normal power mode * * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MODE_NORMAL = 600, /** * Power save mode - * * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + * */ MODE_POWER_SAVE, /** * Performance power mode * * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MODE_PERFORMANCE, /** * Extreme power save mode * * @syscap SystemCapability.PowerManager.PowerManager.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ + MODE_EXTREME_POWER_SAVE, + /** + * Custom power save mode. + * + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @since 20 + */ + MODE_CUSTOM_POWER_SAVE = 650 + } + + /** + * Set the power key filtering strategy. + * The power service typically subscribes to the power key event. And this API is used to configure how the power key + * event should be handled. + * + * @permission ohos.permission.POWER_MANAGER + * @param { PowerKeyFilteringStrategy } strategy Indicates power key filtering + * strategy {@link PowerKeyFilteringStrategy} to set. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission + * required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 4900101 - Failed to connect to the service. + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @systemapi + * @since 21 + */ + function setPowerKeyFilteringStrategy(strategy: PowerKeyFilteringStrategy): void; + + /** + * Power key filtering strategy. + * + * @enum { int } + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @since 21 + */ + export enum PowerKeyFilteringStrategy { + /** + * Disable the filtering of power key long-press event. + * The power service typically subscribes to the power key long-press event whose duration is configurable. And this + * is the default strategy of handling the power key long-press event. + * + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @since 21 + */ + DISABLE_LONG_PRESS_FILTERING = 0, + /** + * Filter the ongoing power key long-press event only once. + * The next power key long-press event is not filtered by default. + * + * @syscap SystemCapability.PowerManager.PowerManager.Core + * @since 21 */ - MODE_EXTREME_POWER_SAVE + LONG_PRESS_FILTERING_ONCE = 1 } } -export default power; +export default power; \ No newline at end of file diff --git a/api/@ohos.print.d.ts b/api/@ohos.print.d.ts index bb0acedf50fd3af5d73aea3252a3821475d828e9..191dbccc26703b7996e139c2f4717cf2975784cd 100644 --- a/api/@ohos.print.d.ts +++ b/api/@ohos.print.d.ts @@ -159,7 +159,7 @@ declare namespace print { * @param { string } jobId - Indicates print job id. * @param { PrintAttributes } oldAttrs - Indicates old print attributes. * @param { PrintAttributes } newAttrs - Indicates new print attributes. - * @param { number } fd - Indicates print file fd. + * @param { int } fd - Indicates print file fd. * @param { function } writeResultCallback - Indicates this function should execute after the file is updated. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -167,7 +167,7 @@ declare namespace print { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - onStartLayoutWrite(jobId: string, oldAttrs: PrintAttributes, newAttrs: PrintAttributes, fd: number, + onStartLayoutWrite(jobId: string, oldAttrs: PrintAttributes, newAttrs: PrintAttributes, fd: int, writeResultCallback: (jobId: string, writeResult: PrintFileCreationState) => void): void; /** @@ -265,12 +265,12 @@ declare namespace print { interface PrintAttributes { /** * Copies of document list. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - copyNumber?: number; + copyNumber?: int; /** * Range size to be printed. @@ -328,30 +328,30 @@ declare namespace print { interface PrintPageRange { /** * Start page of sequence. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - startPage?: number; + startPage?: int; /** * End page of sequence. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - endPage?: number; + endPage?: int; /** * Discrete page of sequence. - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - pages?: Array; + pages?: Array; } /** @@ -365,43 +365,43 @@ declare namespace print { interface PrintMargin { /** * Top margin. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - top?: number; + top?: int; /** * Bottom margin. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - bottom?: number; + bottom?: int; /** * Left margin. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - left?: number; + left?: int; /** * Right margin. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - right?: number; + right?: int; } /** @@ -415,33 +415,33 @@ declare namespace print { interface PrinterRange { /** * Start page of sequence. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - startPage?: number; + startPage?: int; /** * End page of sequence. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - endPage?: number; + endPage?: int; /** * Discrete page of sequence. - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - pages?: Array; + pages?: Array; } /** @@ -465,13 +465,13 @@ declare namespace print { /** * Preview file result. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - result?: number; + result?: int; } /** @@ -495,23 +495,23 @@ declare namespace print { /** * Horizontal DPI. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - horizontalDpi: number; + horizontalDpi: int; /** * Vertical DPI. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - verticalDpi: number; + verticalDpi: int; } /** @@ -542,21 +542,21 @@ declare namespace print { /** * Unit: millimeter width. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - width: number; + width: int; /** * Unit: millimeter height. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - height: number; + height: int; } /** @@ -570,23 +570,23 @@ declare namespace print { interface PrinterCapability { /** * Color mode. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - colorMode: number; + colorMode: int; /** * Duplex mode. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - duplexMode: number; + duplexMode: int; /** * The page size list supported by the printer. @@ -670,13 +670,13 @@ declare namespace print { /** * Resource id of printer icon. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - printerIcon?: number; + printerIcon?: int; /** * Printer description. @@ -720,13 +720,13 @@ declare namespace print { interface PrintJob { /** * Document fd list to be printed. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - fdList: Array; + fdList: Array; /** * Job id. @@ -770,13 +770,13 @@ declare namespace print { /** * Copies of document list. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - copyNumber: number; + copyNumber: int; /** * Range size to be printed. @@ -820,23 +820,23 @@ declare namespace print { /** * Color mode. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - colorMode: number; + colorMode: int; /** * Duplex mode. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - duplexMode: number; + duplexMode: int; /** * Current margin setting. @@ -871,7 +871,7 @@ declare namespace print { /** * Enumeration of Print Direction Mode. - * @enum { number } PrintDirectionMode + * @enum { int } PrintDirectionMode * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -904,7 +904,7 @@ declare namespace print { /** * Enumeration of Print Color Mode. - * @enum { number } PrintColorMode + * @enum { int } PrintColorMode * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -929,7 +929,7 @@ declare namespace print { /** * Enumeration of Print Duplex Mode. - * @enum { number } PrintDuplexMode + * @enum { int } PrintDuplexMode * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -962,7 +962,7 @@ declare namespace print { /** * Enumeration of Print Page Type. - * @enum { number } PrintPageType + * @enum { int } PrintPageType * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -1067,7 +1067,7 @@ declare namespace print { /** * Enumeration of Print Document Adapter State. - * @enum { number } PrintDocumentAdapterState + * @enum { int } PrintDocumentAdapterState * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -1116,7 +1116,7 @@ declare namespace print { /** * Enumeration of Print File Creation State. - * @enum { number } PrintFileCreationState + * @enum { int } PrintFileCreationState * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -1149,7 +1149,7 @@ declare namespace print { /** * Enumeration of Printer State. - * @enum { number } PrinterState + * @enum { int } PrinterState * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -1206,7 +1206,7 @@ declare namespace print { /** * Enumeration of Print Job State. - * @enum { number } PrintJobState + * @enum { int } PrintJobState * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -1255,7 +1255,7 @@ declare namespace print { /** * Enumeration of Print Job Sub State. - * @enum { number } PrintJobSubState + * @enum { int } PrintJobSubState * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -1397,6 +1397,14 @@ declare namespace print { */ PRINT_JOB_BLOCK_BAD_CERTIFICATE = 16, + /** + * Print printer driver exception. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 + * @arkts 1.1&1.2 + */ + PRINT_JOB_BLOCK_DRIVER_EXCEPTION = 17, + /** * Print an error occurred when printing the account. * @syscap SystemCapability.Print.PrintFramework @@ -1485,6 +1493,30 @@ declare namespace print { */ PRINT_JOB_BLOCK_FILE_UPLOADING_ERROR = 30, + /** + * Print driver file missing. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 + * @arkts 1.1&1.2 + */ + PRINT_JOB_BLOCK_DRIVER_MISSING = 34, + + /** + * Print job interrupt. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 + * @arkts 1.1&1.2 + */ + PRINT_JOB_BLOCK_INTERRUPT = 35, + + /** + * Print on an unavailable printer. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 + * @arkts 1.1&1.2 + */ + PRINT_JOB_BLOCK_PRINTER_UNAVAILABLE = 98, + /** * Print unknown issue. * @syscap SystemCapability.Print.PrintFramework @@ -1496,7 +1528,7 @@ declare namespace print { /** * Enumeration of Print error Code. - * @enum { number } PrintErrorCode + * @enum { int } PrintErrorCode * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -1593,7 +1625,7 @@ declare namespace print { /** * Enumeration of application event. - * @enum { number } ApplicationEvent + * @enum { int } ApplicationEvent * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -1665,13 +1697,13 @@ declare namespace print { /** * Vendor icon. - * @type { number } + * @type { int } * @syscap SystemCapability.Print.PrintFramework * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - vendorIcon: number; + vendorIcon: int; /** * Version of current printer extension. @@ -1714,14 +1746,25 @@ declare namespace print { * Load the specific printer extension and start to discover printer. * @permission ohos.permission.MANAGE_PRINT_JOB * @param { Array } extensionList - Indicates the list of printer extension. - * empty list of extensionList Indicates to find printer with all installed extension. + * empty list of extensionList Indicates to find printer with all installed extension. * @param { AsyncCallback } callback - The callback function for indcating the result of API execution. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Load the specific printer extension and start to discover printer. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @param { Array } extensionList - Indicates the list of printer extension. + * empty list of extensionList Indicates to find printer with all installed extension. + * @param { AsyncCallback } callback - The callback function for indcating the result of API execution. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function startDiscoverPrinter(extensionList: Array, callback: AsyncCallback): void; @@ -1730,14 +1773,25 @@ declare namespace print { * Load the specific printer extension and start to discover printer. * @permission ohos.permission.MANAGE_PRINT_JOB * @param { Array } extensionList - Indicates the list of printer extension. - * empty list of extensionList Indicates to find printer with all installed extension. + * empty list of extensionList Indicates to find printer with all installed extension. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Load the specific printer extension and start to discover printer. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @param { Array } extensionList - Indicates the list of printer extension. + * empty list of extensionList Indicates to find printer with all installed extension. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function startDiscoverPrinter(extensionList: Array): Promise; @@ -1750,7 +1804,15 @@ declare namespace print { * @throws { BusinessError } 202 - not system application * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Stop discovering the printer with specific printer extension. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @param { AsyncCallback } callback - The callback function for indcating the result of API execution. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function stopDiscoverPrinter(callback: AsyncCallback): void; @@ -1763,7 +1825,15 @@ declare namespace print { * @throws { BusinessError } 202 - not system application * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Stop discovering the printer with specific printer extension. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function stopDiscoverPrinter(): Promise; @@ -1775,10 +1845,20 @@ declare namespace print { * @param { AsyncCallback } callback - The callback function for indcating the result of API execution. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Connect the specific printer. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @param { string } printerId - Indicates id of the printer. + * @param { AsyncCallback } callback - The callback function for indcating the result of API execution. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function connectPrinter(printerId: string, callback: AsyncCallback): void; @@ -1790,10 +1870,20 @@ declare namespace print { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since 10 + */ + /** + * Connect the specific printer. + * @permission ohos.permission.MANAGE_PRINT_JOB or ohos.permission.PRINT + * @param { string } printerId - Indicates id of the printer. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @syscap SystemCapability.Print.PrintFramework + * @since 20 * @arkts 1.1&1.2 */ function connectPrinter(printerId: string): Promise; @@ -1918,11 +2008,25 @@ declare namespace print { */ function cancelPrintJob(jobId: string): Promise; + /** + * Restart the print job has been sent. + * @permission ohos.permission.MANAGE_PRINT_JOB + * @param { string } jobId - Indicates the specific print job. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @throws { BusinessError } 202 - not system application + * @syscap SystemCapability.Print.PrintFramework + * @systemapi Hide this for inner system use. + * @since 20 + * @arkts 1.1&1.2 + */ + function restartPrintJob(jobId: string): Promise; + /** * Request preview of the print job. * @permission ohos.permission.MANAGE_PRINT_JOB * @param { PrintJob } jobInfo - Indicates the information of print job. - * @param { Callback } callback - The callback function for indcating the result of API execution. + * @param { Callback } callback - The callback function for indcating the result of API execution. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -1931,13 +2035,13 @@ declare namespace print { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - function requestPrintPreview(jobInfo: PrintJob, callback: Callback): void; + function requestPrintPreview(jobInfo: PrintJob, callback: Callback): void; /** * Request preview of the print job. * @permission ohos.permission.MANAGE_PRINT_JOB * @param { PrintJob } jobInfo - Indicates the information of print job. - * @returns { Promise } the promise returned by the function. + * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -1946,7 +2050,7 @@ declare namespace print { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - function requestPrintPreview(jobInfo: PrintJob): Promise; + function requestPrintPreview(jobInfo: PrintJob): Promise; /** * Register event callback for the state change of printer. @@ -2233,9 +2337,9 @@ declare namespace print { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 11 * @useinstead print#queryPrintJobList + * @arkts 1.1&1.2 */ function queryAllPrintJobs(callback: AsyncCallback): void; @@ -2248,12 +2352,25 @@ declare namespace print { * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 * @deprecated since 11 * @useinstead print#queryPrintJobList + * @arkts 1.1&1.2 */ function queryAllPrintJobs(): Promise; + /** + * Get all active printJobs in the queue. + * @permission ohos.permission.MANAGE_PRINT_JOB + * @returns { Promise } Returns a list of all active print jobs. + * @throws { BusinessError } 201 - the application does not have permission to call this function. + * @throws { BusinessError } 202 - not system application + * @syscap SystemCapability.Print.PrintFramework + * @systemapi Hide this for inner system use. + * @since 20 + * @arkts 1.1&1.2 + */ + function queryAllActivePrintJobs(): Promise; + /** * Get all the printJobs in the queue. * @permission ohos.permission.MANAGE_PRINT_JOB @@ -2315,7 +2432,7 @@ declare namespace print { * @permission ohos.permission.MANAGE_PRINT_JOB * @param { string } jobId - Indicates id of the print job. * @param { PrintAttributes } printAttributes - Indicates print attributes. - * @param { number } fd - Indicates print file fd. + * @param { int } fd - Indicates print file fd. * @param { Callback } onFileStateChanged - The callback function for update the file state. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application @@ -2325,7 +2442,7 @@ declare namespace print { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - function startGettingPrintFile(jobId: string, printAttributes: PrintAttributes, fd: number, + function startGettingPrintFile(jobId: string, printAttributes: PrintAttributes, fd: int, onFileStateChanged: Callback): void; /** @@ -2378,7 +2495,8 @@ declare namespace print { * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - the application does not have permission to call this function. * @throws { BusinessError } 202 - not system application - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Print.PrintFramework * @systemapi Hide this for inner system use. * @since arkts {'1.1':'12','1.2':'20'} @@ -2626,7 +2744,7 @@ declare namespace print { /** * Enumeration of Print Quality. - * @enum { number } PrintQuality + * @enum { int } PrintQuality * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -2659,7 +2777,7 @@ declare namespace print { /** * Enumeration of Print OrientationMode. - * @enum { number } PrintOrientationMode + * @enum { int } PrintOrientationMode * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -2708,7 +2826,7 @@ declare namespace print { /** * Enumeration of Printer Status. - * @enum { number } PrinterStatus + * @enum { int } PrinterStatus * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 @@ -2813,7 +2931,7 @@ declare namespace print { /** * Enumeration of Printer Change Events. - * @enum { number } PrinterEvent + * @enum { int } PrinterEvent * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 @@ -2870,7 +2988,7 @@ declare namespace print { /** * Enumeration of default printer type. - * @enum { number } DefaultPrinterType + * @enum { int } DefaultPrinterType * @syscap SystemCapability.Print.PrintFramework * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 diff --git a/api/@ohos.privacyManager.d.ets b/api/@ohos.privacyManager.d.ets deleted file mode 100644 index cf44b5aeb3fe4de8cb3e35998e89c06625a73d72..0000000000000000000000000000000000000000 --- a/api/@ohos.privacyManager.d.ets +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @file - * @kit AbilityKit - */ -import { AsyncCallback, Callback } from './@ohos.base'; -import { Permissions } from './permissions'; -/** - * @namespace privacyManager - * @syscap SystemCapability.Security.AccessToken - * @since 20 - */ -declare namespace privacyManager { - /** - * Adds an access record of a sensitive permission. - * - * @permission ohos.permission.PERMISSION_USED_STATS - * @param { int } tokenID - Token ID of the application. - * @param { Permissions } permissionName - Name of the permission accessed. - * @param { int } successCount - Number of successful accesses to the permission. - * @param { int } failCount - Number of failed accesses to the permission. - * @param { AddPermissionUsedRecordOptions } options - Options to be added. - * @returns { Promise } Promise that returns no value. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". - * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. - * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, the permissionName exceeds 256 characters, the count value is invalid, - * or usedType in AddPermissionUsedRecordOptions is invalid. - * @throws { BusinessError } 12100002 - The specified tokenID does not exist or refer to an application process. - * @throws { BusinessError } 12100003 - The specified permission does not exist or is not an user_grant permission. - * @throws { BusinessError } 12100007 - The service is abnormal. - * @throws { BusinessError } 12100008 - Out of memory. - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - function addPermissionUsedRecord(tokenID: int, permissionName: Permissions, successCount: int, failCount: int, options?: AddPermissionUsedRecordOptions): Promise; - /** - * Adds access record of sensitive permission. - * - * @permission ohos.permission.PERMISSION_USED_STATS - * @param { int } tokenID - Token ID of the application. - * @param { Permissions } permissionName - Name of the permission to be added. - * @param { int } successCount - Access count. - * @param { int } failCount - Reject count. - * @param { AsyncCallback } callback - Asynchronous callback interface. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. - * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". - * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. - * @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, the permissionName exceeds 256 characters, or the count value is invalid. - * @throws { BusinessError } 12100002 - The specified tokenID does not exist or refer to an application process. - * @throws { BusinessError } 12100003 - The specified permission does not exist or is not an user_grant permission. - * @throws { BusinessError } 12100007 - The service is abnormal. - * @throws { BusinessError } 12100008 - Out of memory. - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - function addPermissionUsedRecord(tokenID: int, permissionName: Permissions, successCount: int, failCount: int, callback: AsyncCallback): void; - /** - * Enumerates the means by which sensitive resources are accessed. - * - * @enum { int } PermissionUsedType - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - enum PermissionUsedType { - /** - * Sensitive resources are accessed with the declared permission or permission granted by the user. - * - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - NORMAL_TYPE = 0, - /** - * Sensitive resources are accessed through a picker. - * - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - PICKER_TYPE = 1, - /** - * Sensitive resources are accessed through a security component. - * - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - SECURITY_COMPONENT_TYPE = 2 - } - /** - * Additional information to add. - * - * @interface AddPermissionUsedRecordOptions - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - interface AddPermissionUsedRecordOptions { - /** - * Used type of the permission accessed. - * - * @type { ?PermissionUsedType } - * @syscap SystemCapability.Security.AccessToken - * @systemapi - * @since 20 - */ - usedType?: PermissionUsedType; - } -} -export default privacyManager; -export { Permissions }; diff --git a/api/@ohos.privacyManager.d.ts b/api/@ohos.privacyManager.d.ts index 22f557c3aaf9b951cf4419460ab5dcac5e4e4ffa..d75603b32e85c691ce2a5ec9c45a5d2d3a8edf66 100644 --- a/api/@ohos.privacyManager.d.ts +++ b/api/@ohos.privacyManager.d.ts @@ -24,17 +24,18 @@ import { Permissions } from './permissions'; /** * @namespace privacyManager * @syscap SystemCapability.Security.AccessToken - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace privacyManager { /** * Adds access record of sensitive permission. * * @permission ohos.permission.PERMISSION_USED_STATS - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be added. - * @param { number } successCount - Access count. - * @param { number } failCount - Reject count. + * @param { int } successCount - Access count. + * @param { int } failCount - Reject count. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". @@ -52,11 +53,11 @@ declare namespace privacyManager { * Adds an access record of a sensitive permission. * * @permission ohos.permission.PERMISSION_USED_STATS - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission accessed. - * @param { number } successCount - Number of successful accesses to the permission. - * @param { number } failCount - Number of failed accesses to the permission. - * @param { AddPermissionUsedRecordOptions } options - Options to be added. + * @param { int } successCount - Number of successful accesses to the permission. + * @param { int } failCount - Number of failed accesses to the permission. + * @param { AddPermissionUsedRecordOptions } [options] - Options to be added. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". @@ -69,13 +70,14 @@ declare namespace privacyManager { * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function addPermissionUsedRecord( - tokenID: number, + tokenID: int, permissionName: Permissions, - successCount: number, - failCount: number, + successCount: int, + failCount: int, options?: AddPermissionUsedRecordOptions ): Promise; @@ -83,10 +85,10 @@ declare namespace privacyManager { * Adds access record of sensitive permission. * * @permission ohos.permission.PERMISSION_USED_STATS - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be added. - * @param { number } successCount - Access count. - * @param { number } failCount - Reject count. + * @param { int } successCount - Access count. + * @param { int } failCount - Reject count. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". @@ -98,13 +100,14 @@ declare namespace privacyManager { * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function addPermissionUsedRecord( - tokenID: number, + tokenID: int, permissionName: Permissions, - successCount: number, - failCount: number, + successCount: int, + failCount: int, callback: AsyncCallback ): void; @@ -181,8 +184,8 @@ declare namespace privacyManager { * @permission ohos.permission.PERMISSION_USED_STATS * @param { number } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be started. - * @param { number } pid - Pid of the application, default -1. - * @param { PermissionUsedType } usedType - Used type of the permission accessed, default NORMAL_TYPE. + * @param { number } [pid] - Pid of the application, default -1. + * @param { PermissionUsedType } [usedType] - Used type of the permission accessed, default NORMAL_TYPE. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". @@ -259,7 +262,7 @@ declare namespace privacyManager { * @permission ohos.permission.PERMISSION_USED_STATS * @param { number } tokenID - Token ID of the application. * @param { Permissions } permissionName - Name of the permission to be stopped. - * @param { number } pid - Pid of the application, default -1. + * @param { number } [pid] - Pid of the application, default -1. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". @@ -321,7 +324,8 @@ declare namespace privacyManager { * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function on( type: 'activeStateChange', @@ -335,7 +339,7 @@ declare namespace privacyManager { * @permission ohos.permission.PERMISSION_USED_STATS * @param { 'activeStateChange' } type - Event type. This parameter cannot change. * @param { Array } permissionList - Indicates the permission list, which are specified. This parameter cannot be null or empty. - * @param { Callback } callback - Callback for listening permission change. + * @param { Callback } [callback] - Callback for listening permission change. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission "ohos.permission.PERMISSION_USED_STATS". * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. @@ -345,7 +349,8 @@ declare namespace privacyManager { * @throws { BusinessError } 12100008 - Out of memory. * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function off( type: 'activeStateChange', @@ -357,7 +362,7 @@ declare namespace privacyManager { * Obtains the used type of the permission accessed. * * @permission ohos.permission.PERMISSION_USED_STATS - * @param { number } tokenId - Token ID of the application. By default, all token IDs of the device are returned. + * @param { int } tokenId - Token ID of the application. By default, all token IDs of the device are returned. * @param { Permissions } permissionName - Name of the permission to query. By default, all permissions of the device are returned. * @returns { Promise> } Promise used to return the information obtained. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. @@ -370,7 +375,27 @@ declare namespace privacyManager { * @systemapi * @since 12 */ - function getPermissionUsedTypeInfos(tokenId?: number, permissionName?: Permissions): Promise>; + + /** + * Obtains the used type of the permission accessed. + * + * @permission ohos.permission.PERMISSION_USED_STATS + * @param { int | null } [tokenId] - Token ID of the application. By default, all token IDs of the device + * are returned. + * @param { Permissions } [permissionName] - Name of the permission to query. By default, all permissions + * of the device are returned. + * @returns { Promise> } Promise used to return the information obtained. + * @throws { BusinessError } 201 - Permission denied. Interface caller does not have permission + * "ohos.permission.PERMISSION_USED_STATS". + * @throws { BusinessError } 202 - Not system app. Interface caller is not a system app. + * @throws { BusinessError } 12100001 - Invalid parameter. PermissionName exceeds 256 characters. + * @throws { BusinessError } 12100002 - The input tokenId does not exist. + * @throws { BusinessError } 12100003 - The input permissionName does not exist. + * @syscap SystemCapability.Security.AccessToken + * @systemapi + * @since 20 + */ + function getPermissionUsedTypeInfos(tokenId?: int | null, permissionName?: Permissions): Promise>; /** * Sets the toggle state of permission access records for the current user. @@ -406,10 +431,11 @@ declare namespace privacyManager { /** * Enum for permission for status. * - * @enum { number } PermissionActiveStatus + * @enum { int } PermissionActiveStatus * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PermissionActiveStatus { /** @@ -417,7 +443,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PERM_INACTIVE = 0, @@ -426,7 +453,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PERM_ACTIVE_IN_FOREGROUND = 1, @@ -435,7 +463,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PERM_ACTIVE_IN_BACKGROUND = 2 } @@ -446,28 +475,31 @@ declare namespace privacyManager { * @interface ActiveChangeResponse * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ActiveChangeResponse { /** * AccessTokenID which called the interface * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - callingTokenId?: number; + callingTokenId?: int; /** * AccessTokenID * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - tokenId: number; + tokenId: int; /** * The permission name @@ -475,7 +507,8 @@ declare namespace privacyManager { * @type { Permissions } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ permissionName: Permissions; @@ -485,7 +518,8 @@ declare namespace privacyManager { * @type { string } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -495,7 +529,8 @@ declare namespace privacyManager { * @type { PermissionActiveStatus } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ activeStatus: PermissionActiveStatus; @@ -505,7 +540,8 @@ declare namespace privacyManager { * @type { ?PermissionUsedType } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ usedType?: PermissionUsedType; } @@ -893,10 +929,11 @@ declare namespace privacyManager { /** * Enumerates the means by which sensitive resources are accessed. * - * @enum { number } PermissionUsedType + * @enum { int } PermissionUsedType * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PermissionUsedType { /** @@ -904,7 +941,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL_TYPE = 0, @@ -913,7 +951,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PICKER_TYPE = 1, @@ -922,7 +961,8 @@ declare namespace privacyManager { * * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SECURITY_COMPONENT_TYPE = 2 } @@ -973,7 +1013,8 @@ declare namespace privacyManager { * @interface AddPermissionUsedRecordOptions * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AddPermissionUsedRecordOptions { /** @@ -982,7 +1023,8 @@ declare namespace privacyManager { * @type { ?PermissionUsedType } * @syscap SystemCapability.Security.AccessToken * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ usedType?: PermissionUsedType; } diff --git a/api/@ohos.promptAction.d.ets b/api/@ohos.promptAction.d.ets deleted file mode 100644 index ceed2c49d243f1be77924e04e3bc5351dbe6b8f1..0000000000000000000000000000000000000000 --- a/api/@ohos.promptAction.d.ets +++ /dev/null @@ -1,1060 +0,0 @@ -/* - * Copyright (c) 2021-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file -* @kit ArkUI -*/ - - -import { ResourceColor, Offset, Dimension, EdgeStyles, EdgeColors } from './arkui/component/units'; -import { AsyncCallback,Callback } from './@ohos.base'; -import { BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, Rectangle, TransitionEffect, KeyboardAvoidMode, CustomBuilder, DismissReason } from './arkui/component/common'; -import { BorderStyle,Alignment } from './arkui/component/enums'; -import { EdgeWidths, BorderRadiuses} from './arkui/component/units' -import { Resource } from './global/resource' - - - -/** - * @namespace promptAction - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare namespace promptAction { - - - /** - * @typedef ShowToastOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - export interface ShowToastOptions { - - - - /** - * Text to display. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - message: string | Resource; - - - - /** - * Duration of toast dialog box. The default value is 1500. - * The recommended value ranges from 1500ms to 10000ms. - * NOTE: A value less than 1500 is automatically changed to 1500. The maximum value is 10000ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - duration?: number; - - - - /** - * The distance between toast dialog box and the bottom of screen. - * - * @type { ?(string | number) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - bottom?: string | number; - - - /** - * Determine the show mode of the toast. - * - * @type { ?ToastShowMode } - * @default ToastShowMode.DEFAULT - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - showMode?: ToastShowMode; - /** - * Defines the toast alignment of the screen. - * - * @type { ?Alignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - alignment?: Alignment; - /** - * Defines the toast offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - offset?: Offset; - /** - * Background color of toast. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundColor?: ResourceColor; - /** - * Text color of toast. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - textColor?: ResourceColor; - /** - * Background blur Style of toast. - * - * @type { ?BlurStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - backgroundBlurStyle?: BlurStyle; - /** - * Shadow of toast. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Define whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - enableHoverMode?: boolean; - - /** - * Defines the toast's diaplay area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - hoverModeArea?: HoverModeAreaType; - } - - - /** - * Enum for the toast showMode. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export enum ToastShowMode { - - /** - * Toast shows in app. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - DEFAULT = 0, - - - /** - * Toast shows at the top. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - TOP_MOST = 1, - - /** - * Toast shows in SYSTEM_TOAST window. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - SYSTEM_TOP_MOST = 2 - } - - - - /** - * @typedef Button - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - export interface Button { - - - - /** - * The text displayed in the button. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - text: string | Resource; - - - - /** - * The foreground color of button. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - color: string | Resource; - /** - * Define whether the button responds to Enter/Space key by default. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - primary?: boolean; - } - - - - /** - * @typedef ShowDialogSuccessResponse - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - export interface ShowDialogSuccessResponse { - - - - /** - * Index of the selected button, starting from 0. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - index: number; - } - - - - /** - * @typedef ShowDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - export interface ShowDialogOptions { - - - - /** - * Title of the text to display. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - title?: string | Resource; - - - - /** - * Text body. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - message?: string | Resource; - - - - /** - * Array of buttons in the dialog box. - * The array structure is {text:'button', color: '#666666'}. - * More than one buttons are supported. - * - * @type { ?Array